You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2019/09/18 11:35:49 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #1679: Add fixed partitions

morningman commented on a change in pull request #1679: Add fixed partitions
URL: https://github.com/apache/incubator-doris/pull/1679#discussion_r325615065
 
 

 ##########
 File path: fe/src/main/cup/sql_parser.cup
 ##########
 @@ -1515,6 +1523,81 @@ partition_key_desc ::=
     :}
     ;
 
+fixed_partition_key_desc ::=
+    LBRACKET partition_values:keys RPAREN
+    {:
+        if (keys.size() != 2) {
+            throw new Exception("partition range must contains two elements.");
+        }
+        if (keys.get(0).toUpperCase().equals("MAXVALUE")) {
+            throw new Exception("the left value can't MAXVALUE.");
+        }
+        RESULT = new PartitionKeyDesc(Lists.newArrayList(keys.get(0)), Lists.newArrayList(keys.get(1)));
+    :}
+    | LBRACKET multi_partition_keys_list:keys RPAREN
+      {:
+          if (keys.size() != 2) {
 
 Review comment:
   `keys.size() != 2` should already be guaranteed by the syntax your define here.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org