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

morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new bdf7d2779a [fix](Nereids) aggregate always report has 1 row count 
(#14236)
bdf7d2779a is described below

commit bdf7d2779a207cbd4e6507fe5a275385e2c9df7a
Author: minghong <[email protected]>
AuthorDate: Mon Nov 14 16:27:55 2022 +0800

    [fix](Nereids) aggregate always report has 1 row count (#14236)
    
    the data structure of new stats is changed, bug Agg-estimation is not 
changed
---
 .../src/main/java/org/apache/doris/nereids/stats/StatsCalculatorV2.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculatorV2.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculatorV2.java
index 005e5963da..a3b97c01e3 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculatorV2.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculatorV2.java
@@ -331,6 +331,7 @@ public class StatsCalculatorV2 extends 
DefaultPlanVisitor<StatsDeriveResult, Voi
         StatsDeriveResult childStats = groupExpression.childStatistics(0);
         Map<Id, ColumnStatistic> childSlotToColumnStats = 
childStats.getSlotIdToColumnStats();
         double resultSetCount = groupByExpressions.stream().flatMap(expr -> 
expr.getInputSlots().stream())
+                .map(Slot::getExprId)
                 
.filter(childSlotToColumnStats::containsKey).map(childSlotToColumnStats::get).map(s
 -> s.ndv)
                 .reduce(1d, (a, b) -> a * b);
         if (resultSetCount <= 0) {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to