Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/5555#discussion_r182469110
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/OverAggregate.scala
---
@@ -70,7 +70,12 @@ trait OverAggregate {
val aggStrings = namedAggregates.map(_.getKey).map(
a => s"${a.getAggregation}(${
- if (a.getArgList.size() > 0) {
+ val prefix = if (a.isDistinct) {
--- End diff --
In case we also want to support group-windowed DISTINCT aggregates, we
would need to change `CommonAggregate.aggregationToString()` as well.
---