KurtYoung commented on a change in pull request #9712: [FLINK-13656] 
[sql-parser][table-planner][table-planner-blink] Bump Calcite dependency to 
1.21.0
URL: https://github.com/apache/flink/pull/9712#discussion_r328069049
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/resources/org/apache/flink/table/planner/plan/batch/sql/agg/DistinctAggregateTest.xml
 ##########
 @@ -48,21 +48,23 @@ SortAggregate(isMerge=[true], select=[Final_COUNT(count$0) 
AS EXPR$0, Final_SUM(
     </Resource>
     <Resource name="planBefore">
       <![CDATA[
-LogicalAggregate(group=[{}], EXPR$0=[COUNT(DISTINCT $0)], EXPR$1=[SUM(DISTINCT 
$0)], EXPR$2=[MAX(DISTINCT $0)])
+LogicalAggregate(group=[{}], EXPR$0=[COUNT(DISTINCT $0)], EXPR$1=[SUM(DISTINCT 
$0)], EXPR$2=[MAX($0)])
 +- LogicalProject(a=[$0])
    +- LogicalTableScan(table=[[default_catalog, default_database, MyTable, 
source: [TestTableSource(a, b, c)]]])
 ]]>
     </Resource>
     <Resource name="planAfter">
       <![CDATA[
-SortAggregate(isMerge=[true], select=[Final_COUNT(count$0) AS EXPR$0, 
Final_SUM(sum$1) AS EXPR$1, Final_MAX(max$2) AS EXPR$2])
+SortAggregate(isMerge=[true], select=[Final_COUNT(count$0) FILTER min$2 AS 
EXPR$0, Final_SUM(sum$1) FILTER min$2 AS EXPR$1, Final_MIN(min$2) AS EXPR$2])
 
 Review comment:
   I think this is the bad case of the newly introduced distinct rules. The old 
plan is actually better than this one.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to