godfreyhe commented on a change in pull request #9056: [FLINK-13185] 
[sql-parser][table-planner] Bump Calcite dependency to 1.20.0 in sql parser & 
flink planner
URL: https://github.com/apache/flink/pull/9056#discussion_r302060587
 
 

 ##########
 File path: 
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/plan/RetractionRulesTest.scala
 ##########
 @@ -251,21 +251,17 @@ class RetractionRulesTest extends TableTestBase {
     val expected =
       unaryNode(
         "DataStreamGroupAggregate",
 
 Review comment:
   before upgrade, the flink logical plan is 
   ```
   FlinkLogicalAggregate(group=[{0}], EXPR$0=[COUNT($0)])
     FlinkLogicalUnion(all=[true])
       FlinkLogicalCalc(expr#0..1=[{inputs}], count=[$t1])
         FlinkLogicalAggregate(group=[{0}], EXPR$0=[COUNT($1)])
           FlinkLogicalDataStreamScan(id=[1], fields=[word, number])
       FlinkLogicalCalc(expr#0..1=[{inputs}], count=[$t1])
         FlinkLogicalDataStreamScan(id=[2], fields=[word_r, count_r])
   ```
   
   after upgrade, the flink logical plan is
   ```
   FlinkLogicalAggregate(group=[{0}], EXPR$0=[COUNT($0)])
     FlinkLogicalCalc(expr#0..1=[{inputs}], count=[$t1])
       FlinkLogicalUnion(all=[true])
         FlinkLogicalAggregate(group=[{0}], EXPR$0=[COUNT($1)])
           FlinkLogicalDataStreamScan(id=[1], fields=[word, number])
         FlinkLogicalDataStreamScan(id=[2], fields=[word_r, count_r])
   ```
   
   however, their costs are totally same on the second-top level node
   ```
        rel#99:Subset#6.LOGICAL, best=rel#107, importance=0.9
                
rel#107:FlinkLogicalCalc.LOGICAL(input=RelSubset#102,expr#0..1={inputs},count=$t1),
 rowcount=110.0, cumulative cost={520.0 rows, 410.0 cpu, 5200.0 io}
                
rel#118:FlinkLogicalUnion.LOGICAL(input#0=RelSubset#116,input#1=RelSubset#117,all=true),
 rowcount=110.0, cumulative cost={520.0 rows, 410.0 cpu, 5200.0 io}
   ```
   some behaviors are changed (maybe 
[CALCITE-2897](https://issues.apache.org/jira/browse/CALCITE-2897), i do not 
have time to debug the details) in volcano planner which cause different choice.

----------------------------------------------------------------
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