sql-parser-cst
sql-parser-cst copied to clipboard
BigQuery support (LIKE ANY|SOME UNNEST)
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)
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.