[
https://issues.apache.org/jira/browse/FLINK-4692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15817981#comment-15817981
]
ASF GitHub Bot commented on FLINK-4692:
---------------------------------------
Github user twalthr commented on a diff in the pull request:
https://github.com/apache/flink/pull/2938#discussion_r95552574
--- Diff:
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
---
@@ -591,5 +729,27 @@ object AggregateUtil {
groupingOffsetMapping.toArray
}
+
+ private def getTimeFieldPosition(timeField: Expression, inputType:
RelDataType): Int = {
+ timeField match {
+ case ResolvedFieldReference(name, resultType) =>
+ // get the RelDataType referenced by the time-field
+ val relDataType = inputType.getFieldList.filter(r =>
name.equals(r.getName))
+ // should only match one
+ if (relDataType.length == 1) {
+ relDataType.head.getIndex
+ } else {
+ throw new IllegalArgumentException()
--- End diff --
I would throw a general `TableException` and give a meaningful message here
and in the following 2 exceptions.
> Add tumbling group-windows for batch tables
> -------------------------------------------
>
> Key: FLINK-4692
> URL: https://issues.apache.org/jira/browse/FLINK-4692
> Project: Flink
> Issue Type: Sub-task
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: Jark Wu
>
> Add Tumble group-windows for batch tables as described in
> [FLIP-11|https://cwiki.apache.org/confluence/display/FLINK/FLIP-11%3A+Table+API+Stream+Aggregations].
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)