cloud-fan commented on issue #28026: [SPARK-31257][SQL] Unify create table 
syntax (WIP)
URL: https://github.com/apache/spark/pull/28026#issuecomment-606619877
 
 
   > Hive allows EXTERNAL with a custom LOCATION, so I don't think that Spark 
should prevent this from being passed to catalogs.
   
   This is similar to the table option/property discussion. Hive has more 
features (more flexible parser) than Spark, but it doesn't mean Spark needs to 
accept them all.
   
   When we introduced the Spark native CREATE TABLE syntax, we evaluated the 
Hive syntax and decided to forbid the EXTERNAL keyword. Hive requires LOCATION 
to be specified if EXTERNAL exists, but also allows LOCATION to be specified 
even there is no EXTERNAL. So the missing feature is: creating a managed table 
with a custom location. This feature is weird and actually Hive metatore gives 
a warning message if the client creates managed tables with custom location, 
which implies that Hive doesn't recommend using this feature as well.
   
   I think we shouldn't put EXTERNAL into v2 API and we should probably forbid 
EXTERNAL for hive tables as well eventually, to be consistent with Spark native 
tables.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to