zhujunxxxxx commented on a change in pull request #10410:
URL: https://github.com/apache/shardingsphere/pull/10410#discussion_r641655784
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -964,23 +964,136 @@ alterSynonym
;
alterTablePartitioning
- : addTablePartition | dropTablePartition
+ : modifyTablePartition
+ | moveTablePartition
+ | addTablePartition
+ | coalesceTablePartition
+ | dropTablePartition
+ ;
+
+modifyTablePartition
+ : modifyRangePartition
+ | modifyHashPartition
+ | modifyListPartition
+ ;
+
+modifyRangePartition
+ : MODIFY partitionExtendedName (partitionAttributes
+ | (addRangeSubpartition | addHashSubpartition | addListSubpartition)
+ | coalesceTableSubpartition | alterMappingTableClauses | REBUILD? UNUSABLE
LOCAL INDEXES
+ | readOnlyClause | indexingClause)
+ ;
+
+modifyHashPartition
+ : MODIFY partitionExtendedName (partitionAttributes |
coalesceTableSubpartition
+ | alterMappingTableClauses | REBUILD? UNUSABLE LOCAL INDEXES |
readOnlyClause | indexingClause)
+ ;
+
+modifyListPartition
+ : MODIFY partitionExtendedName (partitionAttributes
+ | (ADD | DROP) VALUES LP_ listValues RP_
+ | (addRangeSubpartition | addHashSubpartition | addListSubpartition)
+ | coalesceTableSubpartition | REBUILD? UNUSABLE LOCAL INDEXES |
readOnlyClause | indexingClause)
+ ;
+
+partitionExtendedName
+ : PARTITION partitionName
+ | PARTITION FOR LR_ partitionKeyValue (COMMA_ partitionKeyValue)* RP_
+ ;
+
+addRangeSubpartition
+ : ADD rangeSubpartitionDesc (COMMA_ rangeSubpartitionDesc)*
dependentTablesClause? updateIndexClauses?
+ ;
+
+dependentTablesClause
+ : DEPENDENT TABLES LP_ tableName LP_ partitionSpec (COMMA_ partitionSpec)*
RP_
+ (tableName LP_ partitionSpec (COMMA_ partitionSpec)* RP_)* RP_
+ ;
+
+addHashSubpartition
+ : ADD individualHashSubparts dependentTablesClause? updateIndexClauses?
parallelClause?
+ ;
+
+addListSubpartition
+ : ADD listSubpartitionDesc (COMMA_ listSubpartitionDesc)*
dependentTablesClause? updateIndexClauses?
+ ;
+
+coalesceTableSubpartition
+ : COALESCE SUBPARTITION subpartitionName updateIndexClauses?
parallelClause? allowDisallowClustering?
+ ;
+
+allowDisallowClustering
+ : (ALLOW | DISALLOW) CLUSTERING
+ ;
+
+alterMappingTableClauses
+ : MAPPING TABLE (allocateExtentClause | deallocateUnusedClause)
+ ;
+
+deallocateUnusedClause
+ : DEALLOCATE UNUSED (KEEP sizeClause)?
+ ;
+
+allocateExtentClause
+ : ALLOCATE EXTENT (LP_ (SIZE sizeClause | DATAFILE SQ_ fileName SQ_ |
INSTANCE NUMBER_) RP_)?
+ ;
+
+partitionSpec
+ : PARTITION partitionName? tablePartitionDescription?
+ ;
+
+partitionAttributes
+ : (physicalAttributesClause | loggingClause | allocateExtentClause |
deallocateUnusedClause | shrinkClause)?
+ (OVERFLOW (physicalAttributesClause | loggingClause |
allocateExtentClause | deallocateUnusedClause)?)?
+ tableCompression? inmemoryClause?
Review comment:
ok, next PR fix it.
--
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]