Skip to content

Commit

Permalink
[FLINK-10201] [table] [test] The batchTestUtil was mistakenly used in…
Browse files Browse the repository at this point in the history
… some stream sql tests

This closes apache#6605.
  • Loading branch information
xccui committed Aug 25, 2018
1 parent 52cbe07 commit 6d28a65
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class CorrelateTest extends TableTestBase {

@Test
def testLeftOuterJoinAsSubQuery(): Unit = {
val util = batchTestUtil()
val util = streamTestUtil()
val func1 = new TableFunc1
util.addTable[(Int, Long, String)]("MyTable", 'a, 'b, 'c)
util.addTable[(Int, Long, String)]("MyTable2", 'a2, 'b2, 'c2)
Expand All @@ -121,13 +121,13 @@ class CorrelateTest extends TableTestBase {
| ON c2 = s """.stripMargin

val expected = binaryNode(
"DataSetJoin",
batchTableNode(1),
"DataStreamJoin",
streamTableNode(1),
unaryNode(
"DataSetCalc",
"DataStreamCalc",
unaryNode(
"DataSetCorrelate",
batchTableNode(0),
"DataStreamCorrelate",
streamTableNode(0),
term("invocation", "func1($cor0.c)"),
term("correlate", "table(func1($cor0.c))"),
term("select", "a", "b", "c", "f0"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,29 +173,26 @@ class SetOperatorsTest extends TableTestBase {

@Test
def testValuesWithCast(): Unit = {
val util = batchTestUtil()
val util = streamTestUtil()

val expected = naryNode(
"DataSetUnion",
"DataStreamUnion",
List(
unaryNode("DataSetCalc",
values("DataSetValues",
tuples(List("0")),
"values=[ZERO]"),
unaryNode("DataStreamCalc",
values("DataStreamValues",
tuples(List("0"))),
term("select", "1 AS EXPR$0, 1 AS EXPR$1")),
unaryNode("DataSetCalc",
values("DataSetValues",
tuples(List("0")),
"values=[ZERO]"),
unaryNode("DataStreamCalc",
values("DataStreamValues",
tuples(List("0"))),
term("select", "2 AS EXPR$0, 2 AS EXPR$1")),
unaryNode("DataSetCalc",
values("DataSetValues",
tuples(List("0")),
"values=[ZERO]"),
unaryNode("DataStreamCalc",
values("DataStreamValues",
tuples(List("0"))),
term("select", "3 AS EXPR$0, 3 AS EXPR$1"))
),
term("all", "true"),
term("union", "EXPR$0, EXPR$1")
term("union all", "EXPR$0, EXPR$1")
)

util.verifySql(
Expand Down

0 comments on commit 6d28a65

Please sign in to comment.