gatorsmile commented on a change in pull request #24938: [SPARK-27946][SQL] 
Hive DDL to Spark DDL conversion USING "show create table"
URL: https://github.com/apache/spark/pull/24938#discussion_r363444039
 
 

 ##########
 File path: 
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -196,7 +196,7 @@ statement
     | SHOW PARTITIONS multipartIdentifier partitionSpec?               
#showPartitions
     | SHOW identifier? FUNCTIONS
         (LIKE? (multipartIdentifier | pattern=STRING))?                
#showFunctions
-    | SHOW CREATE TABLE multipartIdentifier                            
#showCreateTable
+    | SHOW CREATE TABLE multipartIdentifier (AS SPARK)?                
#showCreateTable
 
 Review comment:
   After rethinking it, let us make it more aggressive here. Instead of 
creating Spark native tables for the existing Hive serde tables, we can try to 
always show how to create Spark native tables if possible. This will further 
simplify the migration from Hive to Spark.
   
   To the existing Spark users who prefer to keeping Hive serde formats, we can 
introduce a new option `AS SERDE` which will keep the behaviors in Spark 2.4 or 
prior. 

----------------------------------------------------------------
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