This is an automated email from the ASF dual-hosted git repository. jark pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 87ee1a1cb3ea6cf0680a88a9a153aa38762ad0e6 Author: JingsongLi <lzljs3620...@aliyun.com> AuthorDate: Sun Aug 18 17:18:51 2019 +0200 [FLINK-13775][table-planner-blink] Correct time field index of window agg --- .../planner/plan/rules/logical/BatchLogicalWindowAggregateRule.scala | 2 +- .../planner/plan/rules/logical/StreamLogicalWindowAggregateRule.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/BatchLogicalWindowAggregateRule.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/BatchLogicalWindowAggregateRule.scala index e711d8d..68d20d4 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/BatchLogicalWindowAggregateRule.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/BatchLogicalWindowAggregateRule.scala @@ -73,7 +73,7 @@ class BatchLogicalWindowAggregateRule fieldName, fromLogicalTypeToDataType(toLogicalType(fieldType)), 0, // only one input, should always be 0 - ref.getIndex) + windowExprIdx) } } diff --git a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/StreamLogicalWindowAggregateRule.scala b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/StreamLogicalWindowAggregateRule.scala index af1a481..c94e4de 100644 --- a/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/StreamLogicalWindowAggregateRule.scala +++ b/flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/plan/rules/logical/StreamLogicalWindowAggregateRule.scala @@ -80,7 +80,7 @@ class StreamLogicalWindowAggregateRule rowType.getFieldList.get(v.getIndex).getName, fromLogicalTypeToDataType(toLogicalType(v.getType)), 0, // only one input, should always be 0 - v.getIndex) + windowExprIdx) case _ => throw new ValidationException("Window can only be defined over a time attribute column.") }