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 2021/07/01 16:00:41 UTC
[GitHub] [incubator-doris] morningman commented on a change in pull request #6109: [Bug] Fix bug that adding conflicting partition doesn't report errors
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: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org