mccheah commented on a change in pull request #24798: [SPARK-27724][SQL] 
Implement REPLACE TABLE and REPLACE TABLE AS SELECT with V2
URL: https://github.com/apache/spark/pull/24798#discussion_r301285813
 
 

 ##########
 File path: 
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
 ##########
 @@ -261,6 +269,10 @@ createTableHeader
     : CREATE TEMPORARY? EXTERNAL? TABLE (IF NOT EXISTS)? multipartIdentifier
     ;
 
+replaceTableHeader
 
 Review comment:
   > I'm fine using `[CREATE OR] REPLACE TABLE` instead of `REPLACE TABLE [IF 
NOT EXISTS]`. I think that is better syntax.
   
   We don't support `REPLACE... IF NOT EXISTS` in this PR. It's only either 
`CREATE TABLE IF NOT EXISTS` or `REPLACE TABLE`. I don't see any reason to 
include `CREATE OR REPLACE` table if we don't want to replace the `IF NOT 
EXISTS` parameter in existing spark-sql, but removing support for `IF NOT 
EXISTS` risks breaking existing SQL workflows as I've described above.

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