gengliangwang commented on code in PR #41007:
URL: https://github.com/apache/spark/pull/41007#discussion_r1194354914


##########
sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBaseParser.g4:
##########
@@ -434,17 +434,31 @@ resource
 dmlStatementNoWith
     : insertInto query                                                         
    #singleInsertQuery
     | fromClause multiInsertQueryBody+                                         
    #multiInsertQuery
-    | DELETE FROM multipartIdentifier tableAlias whereClause?                  
    #deleteFromTable
-    | UPDATE multipartIdentifier tableAlias setClause whereClause?             
    #updateTable
-    | MERGE INTO target=multipartIdentifier targetAlias=tableAlias
-        USING (source=multipartIdentifier |
+    | DELETE FROM tableReference tableAlias whereClause?                       
    #deleteFromTable
+    | UPDATE tableReference tableAlias setClause whereClause?                  
    #updateTable
+    | MERGE INTO target=tableReference targetAlias=tableAlias
+        USING (source=tableReference |
           LEFT_PAREN sourceQuery=query RIGHT_PAREN) sourceAlias=tableAlias
         ON mergeCondition=booleanExpression
         matchedClause*
         notMatchedClause*
         notMatchedBySourceClause*                                              
    #mergeIntoTable
     ;
 
+tableReference
+    : IDENTIFIER_KW LEFT_PAREN expression RIGHT_PAREN
+    | multipartIdentifier
+    ;
+
+identifierReference
+    : IDENTIFIER_KW LEFT_PAREN expression RIGHT_PAREN
+    | multipartIdentifier
+    ;
+identifierReferenceAllowTemp

Review Comment:
   +1 with @dtenedor . Shall we have just one identifierReference for all the 
multipartIdentifier



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

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to