KurtYoung commented on a change in pull request #8109: 
[FLINK-12017][table-planner-blink] Support translation from Rank/Deduplicate to 
StreamTransformation
URL: https://github.com/apache/flink/pull/8109#discussion_r272879137
 
 

 ##########
 File path: 
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/stream/StreamExecDeduplicate.scala
 ##########
 @@ -73,4 +92,92 @@ class StreamExecDeduplicate(
       .item("order", orderString)
   }
 
+  //~ ExecNode methods 
-----------------------------------------------------------
+
+  override protected def translateToPlanInternal(
+      tableEnv: StreamTableEnvironment): StreamTransformation[BaseRow] = {
+
+    // TODO checkInput is not acc retract after FLINK- is done
+    val inputIsAccRetract = false
+
+    if (inputIsAccRetract) {
+      throw new TableException(
+        "Deduplicate: Retraction on Deduplicate is not supported yet.\n" +
+          "please re-check sql grammar. \n" +
+          "Note: Deduplicate should not follow a non-windowed GroupBy 
aggregation.")
+    }
+
+    val inputTransform = getInputNodes.get(0).translateToPlan(tableEnv)
+                         .asInstanceOf[StreamTransformation[BaseRow]]
+
+    val rowTypeInfo = 
inputTransform.getOutputType.asInstanceOf[BaseRowTypeInfo]
+
+    val generateRetraction = true
 
 Review comment:
   I think keep first row will not generate retraction?

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


With regards,
Apache Git Services

Reply via email to