sql-parser-cst icon indicating copy to clipboard operation
sql-parser-cst copied to clipboard

BigQuery support (LIKE ANY|SOME UNNEST)

Open imathews opened this issue 1 year ago • 1 comments

When using quantified like operators in BigQuery, we need to use the form LIKE ANY UNNEST(<array>) (docs)

E.g.:

SELECT * FROM (
  SELECT 'dog' as word 
) sub 
WHERE word LIKE ANY UNNEST(ARRAY['d%'])

Currently, this yields a parsing error in this library.

This is different from postgres, where we can just do LIKE ANY <array> (in BQ, this would be a syntax error)

imathews avatar Mar 05 '25 22:03 imathews

Thanks for reporting.

As I see, this feature was added in April 18 2024. The parser currently supports BigQuery as of 31 January 2024.

I'll need to do a larger review of all the changes since then. As I did in #69.

nene avatar Mar 06 '25 06:03 nene