wgy8283335 commented on a change in pull request #10052:
URL: https://github.com/apache/shardingsphere/pull/10052#discussion_r614483714



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -941,9 +945,51 @@ addListPartitionClause
     ;
 
 dropTablePartition
-    : DROP partitionExtendedNames
+    : DROP partitionExtendedNames (updateIndexClauses parallelClause?)?
     ;
 
 partitionExtendedNames
-    : (PARTITION | PARTITIONS) partition
+    : (PARTITION | PARTITIONS) (partitionName | partitionForClauses) (COMMA_ 
(partitionName | partitionForClauses))*
+    ;
+
+partitionForClauses
+    : FOR LP_ partitionKeyValue (COMMA_ partitionKeyValue)* RP_
+    ;
+
+updateIndexClauses
+    : updateGlobalIndexClause | updateAllIndexesClause
+    ;
+
+updateGlobalIndexClause
+    : (UPDATE | INVALIDATE) GLOBAL INDEXES
+    ;
+
+updateAllIndexesClause
+    : UPDATE INDEXES
+    (LP_ indexName LP_ (updateIndexPartition | updateIndexSubpartition)
+    (COMMA_ indexName LP_ (updateIndexPartition | updateIndexSubpartition) 
RP_)* RP_)?
+    ;
+
+updateIndexPartition
+    : indexPartitionDesc indexSubpartitionClause?
+    (COMMA_ indexPartitionDesc indexSubpartitionClause?)*
+    ;
+
+indexPartitionDesc
+    : PARTITION
+    (partitionName
+    ((segmentAttributesClause | indexCompression) | PARAMETERS LP_ SQ_ 
odciParameters SQ_ RP_ )?

Review comment:
       @Liangda-w  “(PCTFREE NUMBER_ | PCTUSED NUMBER_ | INITRANS NUMBER_ | 
storage clause)* ” is more suitable, but if we change physicalAttributesClause 
like this, it will happen as bellow:
   "rule oidIndexClause contains a closure with at least one alternative that 
can match an empty string".
   @tristaZero how could we resolve this problem?




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


Reply via email to