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: 谢健 <[email protected]>
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to