morningman commented on a change in pull request #6109:
URL: https://github.com/apache/incubator-doris/pull/6109#discussion_r662415260



##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/catalog/RangePartitionInfo.java
##########
@@ -90,6 +91,8 @@ public PartitionItem 
createAndCheckPartitionItem(SinglePartitionDesc desc, boole
             if (upperKey.compareTo(newRangeUpper) >= 0) {
                 newRange = checkNewRange(partKeyDesc, newRangeUpper, 
lastRange, currentRange);
                 break;
+            } else if (partKeyDesc.getPartitionType() == 
PartitionKeyDesc.PartitionKeyValueType.FIXED) {

Review comment:
       This is not a good algorithm. The original method is optimized for the 
grammar of `less than`. It will first find a suitable position and then compare 
it. But for the grammar of `fix range`, it should be judged by comparing the 
lower value instead of upper value when finding the suitable position.
   Therefore, different algorithms should be used for different grammars.




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

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to