[fix](Nereids) stats estimation of lessThan #28444
This commit is contained in:
@ -512,6 +512,10 @@ public class FilterEstimation extends ExpressionVisitor<Statistics, EstimationCo
|
||||
context.addKeyIfSlot(rightExpr);
|
||||
return statistics;
|
||||
}
|
||||
if (leftRange.isInfinite() || rightRange.isInfinite()) {
|
||||
return context.statistics.withSel(DEFAULT_INEQUALITY_COEFFICIENT);
|
||||
}
|
||||
|
||||
double leftOverlapPercent = leftRange.overlapPercentWith(rightRange);
|
||||
// Left always greater than right
|
||||
if (leftOverlapPercent == 0) {
|
||||
|
||||
@ -239,4 +239,8 @@ public class StatisticRange {
|
||||
return distinctValues;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "(" + lowExpr + "," + highExpr + ")";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user