hequn8128 commented on a change in pull request #6787: [FLINK-8577][table] 
Implement proctime DataStream to Table upsert conversion
URL: https://github.com/apache/flink/pull/6787#discussion_r248530953
 
 

 ##########
 File path: 
flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/table/validation/TableSinkValidationTest.scala
 ##########
 @@ -46,6 +46,20 @@ class TableSinkValidationTest extends TableTestBase {
     env.execute()
   }
 
+  @Test(expected = classOf[TableException])
+  def testAppendSinkOnUpdatingTable2(): Unit = {
+    val env = StreamExecutionEnvironment.getExecutionEnvironment
+    val tEnv = TableEnvironment.getTableEnvironment(env)
+
+    val t = tEnv.fromUpsertStream(
+      StreamTestData.getSmall3TupleUpsertStream(env), 'id.key, 'num, 'text)
+
+    t.writeToSink(new TestAppendSink)
+
+    // must fail because table is not append-only
+    env.execute()
 
 Review comment:
   Good point! I think we can use `streamTestUtil` to test the sink logic.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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