morrySnow commented on code in PR #67888:
URL: https://github.com/apache/doris/pull/67888#discussion_r4043480334
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/OneRangePartitionEvaluator.java:
##########
@@ -527,59 +526,47 @@ private EvaluateRangeResult
intersectSlotRange(EvaluateRangeResult originResult,
}
private EvaluateRangeResult determinateRangeOfOtherType(
- EvaluateRangeResult context, List<Literal> partitionBound, boolean
isLowerBound) {
+ EvaluateRangeResult context, List<Literal> partitionBound, boolean
isLowerBound,
+ Map<Expression, ColumnRange> defaultColumnRanges) {
if (context.result instanceof Literal) {
return context;
}
- Slot qualifiedSlot = null;
- ColumnRange qualifiedRange = null;
+ LexicographicBoundState boundState = new LexicographicBoundState(
+ partitionBound, isLowerBound, partitionSlots.size());
for (int i = 0; i < partitionSlotTypes.size(); i++) {
PartitionSlotType partitionSlotType = partitionSlotTypes.get(i);
Slot slot = partitionSlots.get(i);
- if (!context.columnRanges.containsKey(slot)) {
+ ColumnRange columnRange = context.columnRanges.containsKey(slot)
Review Comment:
Fixed in fa0753858e8. `determinateRangeOfOtherType` now consults
`defaultColumnRanges` only for a missing `RANGE` coordinate, where the
equal-prefix singleton may have been folded away by range expansion. A missing
first-unresolved `OTHER` coordinate remains unknown and is no longer injected
into the predicate result, so an outer `NOT` cannot complement a synthetic
default-only suffix range and incorrectly prune the partition. Added
`testNotDoesNotComplementDefaultOnlySuffixRange` plus the `NOT(DATE(k3) IN
(...))` lexicographic RANGE regression, including the boundary row and
partition-count assertion.
--
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]