Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/5706#discussion_r175181100 --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/nodes/logical/FlinkLogicalWindowAggregate.scala --- @@ -103,6 +106,19 @@ class FlinkLogicalWindowAggregateConverter FlinkConventions.LOGICAL, "FlinkLogicalWindowAggregateConverter") { + override def matches(call: RelOptRuleCall): Boolean = { + val agg = call.rel(0).asInstanceOf[LogicalWindowAggregate] + + // we do not support these functions natively + // they have to be converted using the WindowAggregateReduceFunctionsRule + val supported = agg.getAggCallList.asScala.map(_.getAggregation.getKind).forall { + case SqlKind.STDDEV_POP | SqlKind.STDDEV_SAMP | SqlKind.VAR_POP | SqlKind.VAR_SAMP => false --- End diff -- Replacing the current code by `SqlKind.AVG_AGG_FUNCTIONS.contains()` lead to several test failures. These tests expected an `AVG` aggregation function that was now replaced by `SUM / COUNT`.
---