wuchong commented on a change in pull request #11674: 
[FLINK-16887][table-planner-blink] Refactor retraction rules to support 
inferring ChangelogMode
URL: https://github.com/apache/flink/pull/11674#discussion_r407300327
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/resources/org/apache/flink/table/planner/plan/stream/sql/DagOptimizationTest.xml
 ##########
 @@ -959,15 +951,15 @@ 
LogicalSink(name=[`default_catalog`.`default_database`.`upsertSink`], fields=[b,
     </Resource>
     <Resource name="planAfter">
       <![CDATA[
-Sink(name=[`default_catalog`.`default_database`.`upsertSink`], fields=[b, c, 
a_sum], updateAsRetraction=[false], accMode=[Acc])
-+- Union(all=[true], union=[b, c, a_sum], updateAsRetraction=[false], 
accMode=[Acc])
-   :- GroupAggregate(groupBy=[b, c], select=[b, c, SUM(a) AS a_sum], 
updateAsRetraction=[false], accMode=[Acc])
-   :  +- Exchange(distribution=[hash[b, c]], updateAsRetraction=[true], 
accMode=[Acc])
-   :     +- TableSourceScan(table=[[default_catalog, default_database, 
MyTable, source: [TestTableSource(a, b, c)]]], fields=[a, b, c], 
updateAsRetraction=[true], accMode=[Acc], reuse_id=[1])
-   +- Calc(select=[CAST(1:BIGINT) AS b, c, a_sum], updateAsRetraction=[false], 
accMode=[Acc])
-      +- GroupAggregate(groupBy=[c], select=[c, SUM(a) AS a_sum], 
updateAsRetraction=[false], accMode=[Acc])
-         +- Exchange(distribution=[hash[c]], updateAsRetraction=[true], 
accMode=[Acc])
-            +- Calc(select=[c, a], updateAsRetraction=[true], accMode=[Acc])
+Sink(name=[`default_catalog`.`default_database`.`upsertSink`], fields=[b, c, 
a_sum], changelogMode=[NONE])
 
 Review comment:
   Since FLIP-95 new sink interfaces, PK of sink is defined in DDL, not derived 
from query anymore. Deriving primary key from query confused many users and 
make Flink SQL not flexible. So I will add the PK information once we integrate 
with new sink interface. 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to