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



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DMLStatement.g4
##########
@@ -644,6 +644,54 @@ havingClause
     : HAVING expr
     ;
 
+modelClause
+    : MODEL cellReferenceOptions? returnRowsClause? (referenceModel+)? 
mainModel
+    ;
+
+cellReferenceOptions
+    : ((IGNORE | KEEP) NAV)? (UNIQUE (DIMENSION | SINGLE REFERENCE))?
+    ;
+
+returnRowsClause
+    : RETURN (UPDATED | ALL) ROWS
+    ;
+
+referenceModel
+    : REFERENCE referenceModelName ON LP_ selectSubquery RP_ 
modelColumnClauses cellReferenceOptions?
+    ;
+
+mainModel
+    : (MAIN mainModelName)? modelColumnClauses cellReferenceOptions? 
modelRulesClause
+    ;
+
+modelColumnClauses
+    : (PARTITION BY LP_ expr alias? (COMMA_ expr alias?)* RP_)?
+    DIMENSION BY LP_ expr alias? (COMMA_ expr alias?)* RP_ MEASURES LP_ expr 
alias? (COMMA_ expr alias?)* RP_
+    ;
+
+modelRulesClause
+    : (RULES (UPDATE | UPSERT ALL?)? ((AUTOMATIC | SEQUENTIAL) ORDER)? 
modelIterateClause?)?
+    LP_ (UPDATE | UPSERT ALL?)? cellAssignment orderByClause? EQ_ expr (COMMA_ 
(UPDATE | UPSERT ALL?)? cellAssignment orderByClause? EQ_ expr)* RP_
+    ;
+
+modelIterateClause
+    : ITERATE LP_ numberLiterals RP_ (UNTIL LP_ expr RP_)?
+    ;
+
+cellAssignment
+    : measureColumn LBT_ (((expr | singleColumnForLoop) (COMMA_ (expr | 
singleColumnForLoop))*) | multiColumnForLoop) RBT_

Review comment:
       Hi @wgy8283335, I've added `condition` rule.
   
   In `jsonCondition`, here's the 
[diagram](https://docs.oracle.com/en/database/oracle/oracle-database/19/adjsn/diagrams-basic-sql-json-path-expression-syntax.html)
 for `jsonBasicPathExpr` and `jsonBasicPathExpr`'s expression explanation 
[documentation](https://docs.oracle.com/en/database/oracle/oracle-database/19/adjsn/json-path-expressions.html#GUID-AEBAD813-99AB-418A-93AB-F96BC1658618).




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to