danny0405 commented on a change in pull request #12284:
URL: https://github.com/apache/flink/pull/12284#discussion_r429926472
##########
File path:
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestValuesRuntimeFunctions.java
##########
@@ -247,6 +265,12 @@ public void invoke(RowData value, Context context) throws
Exception {
"This is probably an
incorrectly implemented test.");
}
}
+ receivedNum++;
+ if (expectedSize != -1 && receivedNum >= expectedSize) {
+ // some sources are infinite (e.g. kafka),
Review comment:
`>=` or `=` ?
##########
File path:
flink-table/flink-table-planner-blink/src/test/java/org/apache/flink/table/planner/factories/TestValuesTableFactory.java
##########
@@ -633,8 +648,11 @@ public SinkRuntimeProvider getSinkRuntimeProvider(Context
context) {
sinkFunction = new
KeyedUpsertingSinkFunction(
tableName,
converter,
- keyIndices);
+ keyIndices,
+ expectedNum);
} else {
+ checkArgument(expectedNum == -1,
+ "Retracting Sink doesn't
support '" + SINK_EXPECTED_MESSAGES_NUM.key() + "' yet.");
Review comment:
Should we move the check to the constructor ?
##########
File path:
flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/plan/stream/sql/TableScanTest.scala
##########
@@ -186,6 +186,61 @@ class TableScanTest extends TableTestBase {
util.verifyPlan("SELECT COUNT(*) FROM src WHERE a > 1",
ExplainDetail.CHANGELOG_MODE)
}
+ @Test
+ def testJoinOnChangelogSource(): Unit = {
+ util.addTable(
+ """
+ |CREATE TABLE changelog_src (
+ | ts TIMESTAMP(3),
+ | a INT,
+ | b DOUBLE
+ |) WITH (
+ | 'connector' = 'values',
+ | 'changelog-mode' = 'I,UA,UB'
+ |)
+ """.stripMargin)
+ util.addTable(
+ """
+ |CREATE TABLE append_src (
+ | ts TIMESTAMP(3),
+ | a INT,
+ | b DOUBLE
+ |) WITH (
+ | 'connector' = 'values',
+ | 'changelog-mode' = 'I'
+ |)
+ """.stripMargin)
Review comment:
Can we also add a ITCase for the stream join ?
----------------------------------------------------------------
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]