You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to extend the CREATE EXTERNAL TABLE syntax parser so the various clauses can be provided in any order and people don't have to put them in a specific order
Aka I want this (and similar) to work:
CREATE EXTERNAL TABLE test
WITH HEADER ROW
STORED AS CSV
LOCATION '/path/to/directory/of/files';
Is your feature request related to a problem or challenge?
At the moment, the
CREATE EXTERNAL TABLE
command requires all clauses in an exact order: https://arrow.apache.org/datafusion/user-guide/sql/ddl.html#create-external-tableSo this is great:
However, generates a somewhat confusing syntax error:
I think #6247 will help but we can do better
Describe the solution you'd like
I would like to extend the CREATE EXTERNAL TABLE syntax parser so the various clauses can be provided in any order and people don't have to put them in a specific order
Aka I want this (and similar) to work:
parser code is here: https://github.com/apache/arrow-datafusion/blob/main/datafusion/sql/src/parser.rs
There is an example of doing similar things in sqlparser-rs for
CREATE FUNCTION
: https://github.com/sqlparser-rs/sqlparser-rs/blob/b29b551fa111bbd50c40568f6aea6c49eafc0b9c/src/parser.rs#L2673-L2702Describe alternatives you've considered
No response
Additional context
I am trying to help here: #6247
I struggled with this syntax while trying to port some sqllogictests: #6234
The text was updated successfully, but these errors were encountered: