wuchong 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_r275104185
##########
File path:
flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/plan/nodes/physical/stream/StreamExecDeduplicate.scala
##########
@@ -60,17 +76,79 @@ class StreamExecDeduplicate(
traitSet,
inputs.get(0),
uniqueKeys,
- isRowtime,
keepLastRow)
}
override def explainTerms(pw: RelWriter): RelWriter = {
val fieldNames = getRowType.getFieldNames
- val orderString = if (isRowtime) "ROWTIME" else "PROCTIME"
super.explainTerms(pw)
.item("keepLastRow", keepLastRow)
.item("key", uniqueKeys.map(fieldNames.get).mkString(", "))
- .item("order", orderString)
+ .item("order", "PROCTIME")
+ }
+
+ //~ ExecNode methods
-----------------------------------------------------------
+
+ override protected def translateToPlanInternal(
+ tableEnv: StreamTableEnvironment): StreamTransformation[BaseRow] = {
+
+ val inputIsAccRetract = StreamExecRetractionRules.isAccRetract(getInput)
+
+ 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.")
Review comment:
The exception looks weird to me. Maybe "Deduplicate doesn't support
retraction input stream currently." is enough.
----------------------------------------------------------------
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