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

 ##########
 File path: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/logical/EnumerableToLogicalTableScan.scala
 ##########
 @@ -38,7 +41,25 @@ class EnumerableToLogicalTableScan(
     val oldRel = call.rel(0).asInstanceOf[EnumerableTableScan]
     val table = oldRel.getTable
     val newRel = LogicalTableScan.create(oldRel.getCluster, table)
-    call.transformTo(newRel)
+
+    val streamTable = table.unwrap(classOf[UpsertStreamTable[_]])
+    val isUpsertTable = streamTable match {
+      case _: UpsertStreamTable[_] =>
+        true
+      case _ =>
+        false
+    }
+
+    if (isUpsertTable) {
 
 Review comment:
   you could merge this if check with match above to simplify code a bit.

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