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/04/08 02:06:49 UTC

[GitHub] [shardingsphere] zhujunxxxxx commented on a change in pull request #9940: Support oracle alter partition grammar

zhujunxxxxx commented on a change in pull request #9940:
URL: https://github.com/apache/shardingsphere/pull/9940#discussion_r609208227



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-oracle/src/main/antlr4/imports/oracle/DDLStatement.g4
##########
@@ -919,3 +919,31 @@ flashbackArchiveClause
 alterSynonym
     : ALTER PUBLIC? SYNONYM (schemaName DOT_)? synonymName (COMPILE | EDITIONABLE | NONEDITIONABLE)
     ;
+
+alterTablePartition
+    : addTablePartition | dropTablePartition
+    ;
+
+addTablePartition
+    : ADD (addRangePartitionClause | addListPartitionClause)
+    ;
+
+addRangePartitionClause
+    : PARTITION partitionName? rangeValuesClause tablePartitionDescription
+    ((LP_? rangeSubpartitionDesc (COMMA_ rangeSubpartitionDesc)* | listSubpartitionDesc (COMMA_ listSubpartitionDesc)* | individualHashSubparts (COMMA_ individualHashSubparts)* RP_?)
+        | hashSubpartitionQuantity)?
+    ;
+
+addListPartitionClause
+    : PARTITION partitionName? listValuesClause tablePartitionDescription
+    ((LP_? rangeSubpartitionDesc (COMMA_ rangeSubpartitionDesc)* | listSubpartitionDesc (COMMA_ listSubpartitionDesc)* | individualHashSubparts (COMMA_ individualHashSubparts)* RP_?)
+    | hashSubpartitionQuantity)?
+    ;
+

Review comment:
       @wgy8283335 
   I know, but I just used the existing syntax to build it. If want to support fully completed grammer maybe need @tristaZero open a issues.
   By the way, the grammer of partition in `CREATE TABLE` are also not support  fully completed grammer.




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