You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/18 00:52:52 UTC

[GitHub] [arrow-datafusion] andygrove opened a new issue, #4262: `create external table` should fail to parse if syntax is incorrect

andygrove opened a new issue, #4262:
URL: https://github.com/apache/arrow-datafusion/issues/4262

   **Describe the bug**
   When using `create external table` with csv files we can specify `with 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**
   
   ```
   ❯ create external table taxi_zone stored as csv with header location "/mnt/bigdata/nyctaxi/taxi+_zone_lookup.csv";
   0 rows in set. Query took 0.008 seconds.
   ❯ select * from taxi_zone limit 10;
   +------------+---------------+-------------------------+--------------+
   | column_1   | column_2      | column_3                | column_4     |
   +------------+---------------+-------------------------+--------------+
   | LocationID | Borough       | Zone                    | service_zone |
   | 1          | EWR           | Newark Airport          | EWR          |
   | 2          | Queens        | Jamaica Bay             | Boro Zone    |
   | 3          | Bronx         | Allerton/Pelham Gardens | Boro Zone    |
   | 4          | Manhattan     | Alphabet City           | Yellow Zone  |
   | 5          | Staten Island | Arden Heights           | Boro Zone    |
   | 6          | Staten Island | Arrochar/Fort Wadsworth | Boro Zone    |
   | 7          | Queens        | Astoria                 | Boro Zone    |
   | 8          | Queens        | Astoria Park            | Boro Zone    |
   | 9          | Queens        | Auburndale              | Boro Zone    |
   +------------+---------------+-------------------------+--------------+
   ```
   
   **Expected behavior**
   SQL should have failed to parse.
   
   **Additional context**
   None
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] HaoYang670 commented on issue #4262: `create external table` should fail to parse if syntax is incorrect

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #4262:
URL: https://github.com/apache/arrow-datafusion/issues/4262#issuecomment-1347753695

   Remove the `waiting-on-upstream` label because the `sqlparser-rs` has been updated to version 28.0.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] HaoYang670 commented on issue #4262: `create external table` should fail to parse if syntax is incorrect

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #4262:
URL: https://github.com/apache/arrow-datafusion/issues/4262#issuecomment-1320872290

   I've file an issue in the sqlparser to add `COMPRESSION` as a `Keyword`: https://github.com/sqlparser-rs/sqlparser-rs/issues/718


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] HaoYang670 commented on issue #4262: `create external table` should fail to parse if syntax is incorrect

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #4262:
URL: https://github.com/apache/arrow-datafusion/issues/4262#issuecomment-1319536468

   Task lists:
   - [ ] with header row
   - [ ] compression by
   - [ ] partitioned by


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] HaoYang670 commented on issue #4262: `create external table` should fail to parse if syntax is incorrect

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #4262:
URL: https://github.com/apache/arrow-datafusion/issues/4262#issuecomment-1319480983

   These queries also fail to parse
   ```sql
   ❯ 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        |
   +----------+----------+----------+
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] alamb closed issue #4262: `create external table` should fail to parse if syntax is incorrect

Posted by GitBox <gi...@apache.org>.
alamb closed issue #4262: `create external table` should fail to parse if syntax is incorrect
URL: https://github.com/apache/arrow-datafusion/issues/4262


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] HaoYang670 commented on issue #4262: `create external table` should fail to parse if syntax is incorrect

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #4262:
URL: https://github.com/apache/arrow-datafusion/issues/4262#issuecomment-1319541596

   By the way, we implement our own `consume_token` in the datafusion currently, Should we update the `comsume_token` function in sqlparser (which I mean `ignore case` https://github.com/apache/arrow-datafusion/pull/1237) so that we can remove the deplicate implementation in Datafusion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-datafusion] HaoYang670 commented on issue #4262: `create external table` should fail to parse if syntax is incorrect

Posted by GitBox <gi...@apache.org>.
HaoYang670 commented on issue #4262:
URL: https://github.com/apache/arrow-datafusion/issues/4262#issuecomment-1319493296

   Same errors when parsing `compression type`:
   ```sql
   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 |
   +---+---+---+
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org