wuchong commented on a change in pull request #10700: [FLINK-15383][table sql / 
planner & legacy planner] Using sink schema field name instead of query schema 
field name for UpsertStreamTableSink.
URL: https://github.com/apache/flink/pull/10700#discussion_r361942857
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/runtime/stream/table/TableSinkITCase.scala
 ##########
 @@ -312,9 +312,10 @@ class TableSinkITCase extends AbstractTestBase {
 
     t.select('id, 'num, 'text.charLength() as 'len, ('id > 0) as 'cTrue)
       .groupBy('len, 'cTrue)
-      .select('len, 'id.count as 'cnt, 'cTrue)
-      .groupBy('cnt, 'cTrue)
-      .select('cnt, 'len.count as 'lencnt, 'cTrue)
+      // test query field name is different with registered sink field name
+      .select('len, 'id.count as 'count, 'cTrue)
+      .groupBy('count, 'cTrue)
+      .select('count, 'len.count as 'lencnt, 'cTrue)
 
 Review comment:
   This case doesn't reproduce the problem. You should also update 
`TestingUpsertTableSink#expectedKeys` to make sure `setKeyFields()` will verify 
the mapping between keys parameter and schema fields. 

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