cloud-fan 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_r300295226
##########
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 worried about creating new SQL syntax in Spark. AFAIK a similar syntax
is `CREATE OR REPLACE TABLE`, which is implemented in
[DB2](https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_72/sqlp/rbafyreplacetable.htm)
and [google
BigQuery](https://cloud.google.com/bigquery/docs/reference/standard-sql/data-definition-language).
This is not a standard SQL syntax, so it's not surprising to see that Oracle
doesn't support it. If Spark want a API for replace table, I think it's more
reasonable to follow DB2 and BigQuery here.
----------------------------------------------------------------
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]