GoogleCloudPlatform / zetasql-toolkit

The ZetaSQL Toolkit is a library that helps users use ZetaSQL Java API to perform SQL analysis for multiple query engines, including BigQuery and Cloud Spanner.
Apache License 2.0
39 stars 10 forks source link

BigQuery join with array column is incorrectly assumed as table #84

Closed dion-gdn closed 1 month ago

dion-gdn commented 3 months ago

When I analyze this query, the analyzer incorrectly assume foo.date_arr as a table:

WITH foo AS (
  SELECT
    ...
    GENERATE_DATE_ARRAY('2024-07-01', '2024-08-01', INTERVAL 1 DAY) as date_arr
)
SELECT
  ...
FROM
  foo
CROSS JOIN
  foo.date_arr

Table not found: foo.date_arr

I haven't looked into it, so any help is appreciated. Thanks

dion-gdn commented 1 month ago

Closing this, tested working using latest version v0.5.3