This is an automated email from the ASF dual-hosted git repository. twalthr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit 9f31d5c76086943d92cbaa27b035c351d9ac3dc8 Author: Timo Walther <twal...@apache.org> AuthorDate: Mon Nov 5 13:58:12 2018 +0100 [hotfix] [table] Move utility method down in JoinTest --- .../flink/table/api/stream/sql/JoinTest.scala | 58 +++++++++++----------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/sql/JoinTest.scala b/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/sql/JoinTest.scala index f435113..37d5bc1 100644 --- a/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/sql/JoinTest.scala +++ b/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/api/stream/sql/JoinTest.scala @@ -790,35 +790,6 @@ class JoinTest extends TableTestBase { "AND(=($0, $4), >($2, $6))") } - private def verifyTimeBoundary( - timeSql: String, - expLeftSize: Long, - expRightSize: Long, - expTimeType: String): Unit = { - val query = - "SELECT t1.a, t2.b FROM MyTable as t1 join MyTable2 as t2 on t1.a = t2.a and " + timeSql - - val resultTable = streamUtil.tableEnv.sqlQuery(query) - val relNode = RelTimeIndicatorConverter.convert( - resultTable.getRelNode, - streamUtil.tableEnv.getRelBuilder.getRexBuilder) - val joinNode = relNode.getInput(0).asInstanceOf[LogicalJoin] - val (windowBounds, _) = - WindowJoinUtil.extractWindowBoundsFromPredicate( - joinNode.getCondition, - 4, - joinNode.getRowType, - joinNode.getCluster.getRexBuilder, - streamUtil.tableEnv.getConfig) - - val timeTypeStr = - if (windowBounds.get.isEventTime) "rowtime" - else "proctime" - assertEquals(expLeftSize, windowBounds.get.leftLowerBound) - assertEquals(expRightSize, windowBounds.get.leftUpperBound) - assertEquals(expTimeType, timeTypeStr) - } - @Test def testLeftOuterJoinEquiPred(): Unit = { val util = streamTestUtil() @@ -1009,6 +980,35 @@ class JoinTest extends TableTestBase { util.verifyTable(result, expected) } + private def verifyTimeBoundary( + timeSql: String, + expLeftSize: Long, + expRightSize: Long, + expTimeType: String): Unit = { + val query = + "SELECT t1.a, t2.b FROM MyTable as t1 join MyTable2 as t2 on t1.a = t2.a and " + timeSql + + val resultTable = streamUtil.tableEnv.sqlQuery(query) + val relNode = RelTimeIndicatorConverter.convert( + resultTable.getRelNode, + streamUtil.tableEnv.getRelBuilder.getRexBuilder) + val joinNode = relNode.getInput(0).asInstanceOf[LogicalJoin] + val (windowBounds, _) = + WindowJoinUtil.extractWindowBoundsFromPredicate( + joinNode.getCondition, + 4, + joinNode.getRowType, + joinNode.getCluster.getRexBuilder, + streamUtil.tableEnv.getConfig) + + val timeTypeStr = + if (windowBounds.get.isEventTime) "rowtime" + else "proctime" + assertEquals(expLeftSize, windowBounds.get.leftLowerBound) + assertEquals(expRightSize, windowBounds.get.leftUpperBound) + assertEquals(expTimeType, timeTypeStr) + } + private def verifyRemainConditionConvert( query: String, expectCondStr: String): Unit = {