You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/10/30 13:28:58 UTC
[GitHub] [spark] cloud-fan commented on a change in pull request #26167:
[SPARK-28893][SQL] Support MERGE INTO in the parser and add the
corresponding logical plan
cloud-fan commented on a change in pull request #26167: [SPARK-28893][SQL] Support MERGE INTO in the parser and add the corresponding logical plan
URL: https://github.com/apache/spark/pull/26167#discussion_r340611858
##########
File path: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4
##########
@@ -219,6 +219,12 @@ statement
| RESET #resetConfiguration
| DELETE FROM multipartIdentifier tableAlias whereClause? #deleteFromTable
| UPDATE multipartIdentifier tableAlias setClause whereClause? #updateTable
+ | MERGE INTO target=multipartIdentifier targetAlias=tableAlias
+ USING (source=multipartIdentifier |
+ '(' sourceQuery=query')') sourceAlias=tableAlias
Review comment:
nvm, I checked with pgsql and we can have cte in multiple places. Below is a valid SQL:
`with s(i) as (select 1) insert into t with d(i) as (select 2) select i from d`.
We should fix it in Spark later.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org