You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zhangfengcdt (via GitHub)" <gi...@apache.org> on 2023/08/14 19:55:07 UTC

[GitHub] [shardingsphere] zhangfengcdt commented on a diff in pull request #27994: Feat: Support parsing Oracle CREATE MATERIALIZED sql

zhangfengcdt commented on code in PR #27994:
URL: https://github.com/apache/shardingsphere/pull/27994#discussion_r1293908973


##########
parser/sql/dialect/oracle/src/main/antlr4/imports/oracle/DDLStatement.g4:
##########
@@ -3257,6 +3257,462 @@ arryDMLSubClause
     : LP_ typeName (COMMA_ varrayType)? RP_
     ;
 
+createMaterializedView
+    : CREATE MATERIALIZED VIEW materializedViewName
+      (OF typeName )?
+        ( LP_ (scopedTableRefConstraint | mvColumnAlias) (COMMA_ (scopedTableRefConstraint | mvColumnAlias))* RP_ )?
+        ( ON PREBUILT TABLE ( (WITH | WITHOUT) REDUCED PRECISION)?
+        | physicalProperties?  (CACHE | NOCACHE)? parallelClause? buildClause?
+        )
+        ( USING INDEX ( (physicalAttributesClause | TABLESPACE tablespaceName)+ )*
+        | USING NO INDEX
+        )?
+        createMvRefresh?
+        (FOR UPDATE)?
+        ( (DISABLE | ENABLE) QUERY REWRITE )?
+        AS selectSubquery
+    ;
+
+rowLimitingClause

Review Comment:
   @strongduanmu I was trying to import the "DMLStatement" in the DDL g4 statement, however, this causes a circular import since DML also imports DDL g4 file.
   
   I think the circular dependency could be removed by moving some of the definitions into the base g4 file, but that seems to be out of scope for this change. 
   
   Could you advise how to proceed? Thanks!
    



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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