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

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   When parsing a SQL query with an invalid file compression type, we detect 
the error when creating the `ListingTable` which is too late:
   ```sql
   ❯ create external table t1 stored as csv with header row compression type 
zzz location "../datafusion/core/tests/example.csv";
   Execution("Unknown FileCompressionType ZZZ")
   ```
   Besides, we should return a `ParserError`, instead of a 
`DataFusionError::Execution` error.
   
https://github.com/apache/arrow-datafusion/blob/3611d911a3c9f3740bb1fc0527198be39ff47bfd/datafusion/core/src/datasource/listing_table_factory.rs#L62-L70
   
   **Describe the solution you'd like**
   We could detect this error when parsing the `CreateExternalTable`
   
   **Describe alternatives you've considered**
   A clear and concise description of any alternative solutions or features 
you've considered.
   We could not do this.
   
   **Additional context**
   Add any other context or screenshots about the feature request here.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to