cloud-fan commented on issue #28026: [SPARK-31257][SQL] Unify create table syntax URL: https://github.com/apache/spark/pull/28026#issuecomment-612921360 You are right that the main argument is how to pass the metadata. For the EXTERNAL keyword, according to `SparkSqlAstBuilder.visitCreateHiveTable`: ``` ... // If we are creating an EXTERNAL table, then the LOCATION field is required if (external && location.isEmpty) { operationNotAllowed("CREATE EXTERNAL TABLE must be accompanied by LOCATION", ctx) } ... // If location is defined, we'll assume this is an external table. // Otherwise, we may accidentally delete existing data. val tableType = if (external || location.isDefined) { CatalogTableType.EXTERNAL } else { CatalogTableType.MANAGED } ``` If we implement Hive with catalog v2, what we care about is the table type, not the existence of the EXTERNAL keyword. The table type is decided by the existence of the LOCATION keyword, so I don't think we need the extra "PROP_EXTERNAL". Another problem: How are we going to differentiate SERDEPROPERTIES, TBLPROPERTIES, and OPTIONS? How shall we tell end-users that when to use which statement? > I left a comment with a compromise for Hive-specific information but didn't get a reply. Can you post the link to your comment? Maybe I missed it.
---------------------------------------------------------------- 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]
