You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2021/02/22 09:04:18 UTC
[GitHub] [flink] leonardBang commented on a change in pull request #14905: [FLINK-19608][table-planner-blink] Support TVF based window aggreagte in planner
leonardBang commented on a change in pull request #14905:
URL: https://github.com/apache/flink/pull/14905#discussion_r580077060
##########
File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/calcite/RelTimeIndicatorConverter.scala
##########
@@ -352,31 +360,33 @@ class RelTimeIndicatorConverter(rexBuilder: RexBuilder) extends RelShuttle {
}
private def gatherIndicesToMaterialize(aggregate: Aggregate, input: RelNode): Set[Int] = {
+ val fmq = FlinkRelMetadataQuery.reuseOrCreate(aggregate.getCluster.getMetadataQuery)
+ val windowProps = fmq.getRelWindowProperties(input)
val indicesToMaterialize = mutable.Set[Int]()
// check arguments of agg calls
- aggregate.getAggCallList.foreach(call => if (call.getArgList.size() == 0) {
- // count(*) has an empty argument list
- (0 until input.getRowType.getFieldCount).foreach(indicesToMaterialize.add)
- } else {
- // for other aggregations
Review comment:
```
SELECT
COUNT(*)
FROM TABLE(
TUMBLE(TABLE T1, DESCRIPTOR(rowtime), INTERVAL '5' SECOND))
GROUP BY window_start, window_end
```
I just tried this pattern in `WindowAggregateITCase`, the test result is unexpected although it's not related to here.
----------------------------------------------------------------
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:
users@infra.apache.org