Open
Description
Some dialect like Oracle do not support "AS" in the from clause and failed for some query :
eg that is working or Oracle :
SELECT SRC.*, SYSDATE AS CopyDate FROM TPCH_IN.ORDERS_FLAT SRC WHERE 1 = 1 AND O_ORDERKEY BETWEEN 100 and 1000
whereas this is not working (on Oracle)
SELECT SRC.*, SYSDATE AS CopyDate FROM TPCH_IN.ORDERS_FLAT AS SRC WHERE 1 = 1 AND O_ORDERKEY BETWEEN 100 and 1000
Currently the sqlparser force the addition of the keyword AS between the table and it's alias even the original query does not contains "AS" in its from clause.
I don't see the ability to create a custom dialect to avoid this behavior.
I am not sure but i think the "problem" could be here :
datafusion-sqlparser-rs/src/ast/query.rs
Line 662 in 62495f2
Metadata
Metadata
Assignees
Labels
No labels