-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create external table
should fail to parse if syntax is incorrect
#4262
Comments
These queries also fail to parse ❯ create external table t2 stored as csv with location "../datafusion/core/tests/example.csv";
❯ select * from t2;
+----------+----------+----------+
| column_1 | column_2 | column_3 |
+----------+----------+----------+
| a | b | c |
| 1 | 2 | 3 |
+----------+----------+----------+
❯ create external table t3 stored as csv header location "../datafusion/core/tests/example.csv";
❯ select * from t3;
+----------+----------+----------+
| column_1 | column_2 | column_3 |
+----------+----------+----------+
| a | b | c |
| 1 | 2 | 3 |
+----------+----------+----------+
❯ create external table t4 stored as csv row location "../datafusion/core/tests/example.csv";
❯ select * from t4;
+----------+----------+----------+
| column_1 | column_2 | column_3 |
+----------+----------+----------+
| a | b | c |
| 1 | 2 | 3 |
+----------+----------+----------+
❯ create external table t5 stored as csv header row location "../datafusion/core/tests/example.csv";
❯ select * from t5;
+----------+----------+----------+
| column_1 | column_2 | column_3 |
+----------+----------+----------+
| a | b | c |
| 1 | 2 | 3 |
+----------+----------+----------+ |
Same errors when parsing DataFusion CLI v14.0.0
❯ create external table t5 stored as csv with header row compression location "../datafusion/core/tests/example.csv";
0 rows in set. Query took 0.007 seconds.
❯ select * from t5;
+---+---+---+
| a | b | c |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+ DataFusion CLI v14.0.0
❯ create external table t5 stored as csv with header row partitioned location "../datafusion/core/tests/example.csv";
0 rows in set. Query took 0.013 seconds.
❯ select * from t5;
+---+---+---+
| a | b | c |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
1 row in set. Query took 0.009 seconds. |
This comment was marked as duplicate.
This comment was marked as duplicate.
By the way, we implement our own |
I've file an issue in the sqlparser to add |
Remove the |
Describe the bug
When using
create external table
with csv files we can specifywith header row
to indicate that the file contains headers.I ran this and forgot the syntax and omitted the word
row
and it did not process the header row and also did not fail and tell me that the syntax was incorrect.To Reproduce
Expected behavior
SQL should have failed to parse.
Additional context
None
Task list
with header row
andpartitioned by
#4268)COMPRESSION TYPE
#4590with header row
andpartitioned by
#4268)The text was updated successfully, but these errors were encountered: