This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 33c356e6d8207f71b97abdd77cb9b73dd916233f
Author: 谢健 <jianx...@gmail.com>
AuthorDate: Mon Mar 4 15:28:18 2024 +0800

    fix in stats estimation (#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 ad569bffd47..23aa003dd3f 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
@@ -290,7 +290,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-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to