You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/03/18 06:13:13 UTC

[GitHub] [shardingsphere] ThanoshanMV commented on a change in pull request #9692: Oracle merge statement test cases for merge update clause

ThanoshanMV commented on a change in pull request #9692:
URL: https://github.com/apache/shardingsphere/pull/9692#discussion_r596577594



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DMLStatement.g4
##########
@@ -198,15 +198,23 @@ usingClause
     ;
 
 mergeUpdateClause
-    : WHEN MATCHED THEN UPDATE SET mergeAssignment (COMMA_ mergeAssignment)* whereClause? (DELETE whereClause)?
+    : WHEN MATCHED THEN UPDATE mergeSetAssignmentsClause whereClause? deleteWhereClause?

Review comment:
       Yes @wgy8283335, `WHEN MATCHED THEN UPDATE SET`  is better. I put `SET` separately in the `mergeSetAssignmentsClause`  because of its rule name only. Since the rule name specifies `SetAssignments` in its name, I just put keyword `SET` inside that rule. 
   
   I'll change that one as: 
   ```
   mergeUpdateClause
       : WHEN MATCHED THEN UPDATE SET mergeSetAssignmentsClause whereClause? deleteWhereClause?
       ;
   
   mergeSetAssignmentsClause 
       : mergeAssignment (COMMA_ mergeAssignment)*
   ```
   
   
   
   




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