[
https://issues.apache.org/jira/browse/FLINK-5624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865499#comment-15865499
]
ASF GitHub Bot commented on FLINK-5624:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3252#discussion_r100995825
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/datastream/DataStreamAggregateRule.scala
---
@@ -159,9 +152,25 @@ class LogicalWindowAggregateRule
}
false
}
+
+ private def rewriteTimeIndicatorOperators(agg: LogicalAggregate,
groupExprIdx: Int) = {
+ val project =
agg.getInput.asInstanceOf[HepRelVertex].getCurrentRel.asInstanceOf[LogicalProject]
+ val newProjectExpr = mutable.ArrayBuffer[RexNode]()
+ newProjectExpr.appendAll(project.getChildExps)
+ val rexBuilder = agg.getCluster.getRexBuilder
+ newProjectExpr(groupExprIdx) = rexBuilder.makeTimestampLiteral(
+ DataStreamAggregateRule.TIMESTAMP_ZERO, 3)
+ val newProject = project.copy(project.getTraitSet, project.getInput,
+ newProjectExpr, project.getRowType)
+
+ agg.copy(agg.getTraitSet,
List(newProject)).asInstanceOf[LogicalAggregate]
--- End diff --
Can we create here a `LogicalAggregate` with adapted `groupSet`?
I think adding the `windowingGroupSet` to the `LogicalWindowAggregate` is
not a very nice solution. It would be better if we could keep the existing code
as it is without introducing workarounds for the SQL case.
> Support tumbling window on streaming tables in the SQL API
> ----------------------------------------------------------
>
> Key: FLINK-5624
> URL: https://issues.apache.org/jira/browse/FLINK-5624
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Haohui Mai
> Assignee: Haohui Mai
>
> This is a follow up of FLINK-4691.
> FLINK-4691 adds supports for group-windows for streaming tables. This jira
> proposes to expose the functionality in the SQL layer via the {{GROUP BY}}
> clauses, as described in
> http://calcite.apache.org/docs/stream.html#tumbling-windows.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)