You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by fh...@apache.org on 2017/03/10 23:30:52 UTC
flink git commit: [FLINK-5954] [table] Always assign names to the
windows in SQL queries on streams.
Repository: flink
Updated Branches:
refs/heads/master f15a7d2d9 -> 7ef068ccc
[FLINK-5954] [table] Always assign names to the windows in SQL queries on streams.
This closes #3461.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/7ef068cc
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/7ef068cc
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/7ef068cc
Branch: refs/heads/master
Commit: 7ef068ccc9552799cb9f2bd648782c636d2df2db
Parents: f15a7d2
Author: Haohui Mai <wh...@apache.org>
Authored: Thu Mar 9 13:57:49 2017 -0800
Committer: Fabian Hueske <fh...@apache.org>
Committed: Sat Mar 11 00:30:08 2017 +0100
----------------------------------------------------------------------
.../plan/rules/datastream/LogicalWindowAggregateRule.scala | 2 +-
.../table/api/scala/stream/sql/WindowAggregateTest.scala | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/7ef068cc/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/datastream/LogicalWindowAggregateRule.scala
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/datastream/LogicalWindowAggregateRule.scala b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/datastream/LogicalWindowAggregateRule.scala
index 37a1b7d..9883957 100644
--- a/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/datastream/LogicalWindowAggregateRule.scala
+++ b/flink-libraries/flink-table/src/main/scala/org/apache/flink/table/plan/rules/datastream/LogicalWindowAggregateRule.scala
@@ -107,7 +107,7 @@ class LogicalWindowAggregateRule
val windowExpr = groupExpr
.map(g => (g._2, identifyWindow(g._1)) )
.filter(_._2.isDefined)
- .map(g => (g._1, g._2.get) )
+ .map(g => (g._1, g._2.get.as("w$")) )
windowExpr.size match {
case 0 => None
http://git-wip-us.apache.org/repos/asf/flink/blob/7ef068cc/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/sql/WindowAggregateTest.scala
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/sql/WindowAggregateTest.scala b/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/sql/WindowAggregateTest.scala
index 2781fb8..a25e59c 100644
--- a/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/sql/WindowAggregateTest.scala
+++ b/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/scala/stream/sql/WindowAggregateTest.scala
@@ -42,7 +42,7 @@ class WindowAggregateTest extends TableTestBase {
streamTableNode(0),
term("select", "1970-01-01 00:00:00 AS $f0")
),
- term("window", EventTimeTumblingGroupWindow(None, 'rowtime, 3600000.millis)),
+ term("window", EventTimeTumblingGroupWindow(Some('w$), 'rowtime, 3600000.millis)),
term("select", "COUNT(*) AS EXPR$0")
),
term("select", "EXPR$0")
@@ -64,7 +64,7 @@ class WindowAggregateTest extends TableTestBase {
term("select", "a", "1970-01-01 00:00:00 AS $f1")
),
term("groupBy", "a"),
- term("window", EventTimeTumblingGroupWindow(None, 'rowtime, 60000.millis)),
+ term("window", EventTimeTumblingGroupWindow(Some('w$), 'rowtime, 60000.millis)),
term("select", "a", "COUNT(*) AS EXPR$1")
),
term("select", "a", "EXPR$1")
@@ -86,7 +86,7 @@ class WindowAggregateTest extends TableTestBase {
term("select", "a", "1970-01-01 00:00:00 AS $f1, b, c")
),
term("groupBy", "a, b"),
- term("window", EventTimeTumblingGroupWindow(None, 'rowtime, 1000.millis)),
+ term("window", EventTimeTumblingGroupWindow(Some('w$), 'rowtime, 1000.millis)),
term("select", "a", "b", "SUM(c) AS EXPR$1")
),
term("select", "a", "EXPR$1", "b")
@@ -107,7 +107,7 @@ class WindowAggregateTest extends TableTestBase {
streamTableNode(0),
term("select", "1970-01-01 00:00:00 AS $f0")
),
- term("window", ProcessingTimeTumblingGroupWindow(None, 3600000.millis)),
+ term("window", ProcessingTimeTumblingGroupWindow(Some('w$), 3600000.millis)),
term("select", "COUNT(*) AS EXPR$0")
),
term("select", "EXPR$0")