tobymao / sqlglot

Python SQL Parser and Transpiler
https://sqlglot.com/
MIT License
6.01k stars 604 forks source link

bug(apache doris) match_any and match_all parse error #2902

Closed liujiwen-up closed 5 months ago

liujiwen-up commented 5 months ago

`import sqlglot

sql = """select * from t where comment Match_Any 'OLAP';"""

expr = sqlglot.parse_one(read="doris",sql=sql)`

https://doris.apache.org/docs/dev/data-table/index/inverted-index?_highlight=match_any#query error: File "/Users/liujiwen/PycharmProjects/sqlglot-doris-1116/sqlglot/parser.py", line 1191, in raise_error raise error sqlglot.errors.ParseError: Invalid expression / Unexpected token. Line 1, Col: 39. select * from t where comment Match_Any 'OLAP';

Can you support this, or provide a solution?

tobymao commented 5 months ago

look into LIKE / binary_range_parser