You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2024/03/05 03:54:42 UTC
(doris) branch branch-2.0 updated: [fix](Nereids): fix the condition that check valid in option (#31684) (#31744)
This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new c2c4a78508c [fix](Nereids): fix the condition that check valid in option (#31684) (#31744)
c2c4a78508c is described below
commit c2c4a78508ce63fd1067ded4c976916993349869
Author: 谢健 <ji...@gmail.com>
AuthorDate: Tue Mar 5 11:54:35 2024 +0800
[fix](Nereids): fix the condition that check valid in option (#31684) (#31744)
pick from master #31684
the valid in option should
! (op.min > expr.max or op.max < expr.min)
=============>
op.min <= expr.max and op.max >= expr.min
---
.../src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java
index 3caec8a0fe8..86f955eba3f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/FilterEstimation.java
@@ -288,7 +288,7 @@ public class FilterEstimation extends ExpressionVisitor<Statistics, EstimationCo
if (option instanceof Literal) {
// remove the options which is out of compareExpr.range
if (compareExprStats.minValue <= optionStats.maxValue
- && optionStats.maxValue <= compareExprStats.maxValue) {
+ && optionStats.minValue <= compareExprStats.maxValue) {
validInOptCount++;
LiteralExpr optionLiteralExpr = ((Literal) option).toLegacyLiteral();
if (maxOptionLiteral == null || optionLiteralExpr.compareTo(maxOptionLiteral) >= 0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org