tv42 opened a new issue, #1518:
URL: https://github.com/apache/datafusion-sqlparser-rs/issues/1518

   `CreateTable.location` has no documentation and is a tricky edge case, not 
always set even when SQL statement did set location.
   
   
https://docs.rs/sqlparser/latest/sqlparser/ast/struct.CreateTable.html#structfield.location
   
   Since this took some time to figure out, here's what I've found for others 
also pondering its role:
   
   - `CREATE EXTERNAL TABLE .. LOCATION 'foo'` sets `CreateTable.location`
   - `CREATE TABLE .. LOCATION 'foo'` sets `CreateTable.hive_formats.location`
   - `ALTER TABLE .. LOCATION` sets `AlterTable.location`
   - `AlterTable.location` types are about Hive, and is thus a bit confusing 
for external tables: 
https://docs.rs/sqlparser/latest/sqlparser/ast/enum.Statement.html#variant.AlterTable.field.location
   - alter vs create behaviors thus do not match
   
   Maybe make Hive syntax use the top-level `location` field?


-- 
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-unsubscr...@datafusion.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to