未验证 提交 d22e9651 编写于 作者: J Jark Wu

[hotfix][FLINK-17591][table-planner] Fix...

[hotfix][FLINK-17591][table-planner] Fix TableEnvironmentITCase.testExecuteSqlAndToDataStream failed
上级 dbd93e9f
......@@ -35,15 +35,13 @@ import org.apache.flink.table.utils.TableTestUtil.{readFromResource, replaceStag
import org.apache.flink.table.utils.{TestTableSourceWithTime, TestingOverwritableTableSink}
import org.apache.flink.types.Row
import org.apache.flink.util.FileUtils
import org.apache.flink.shaded.guava18.com.google.common.collect.Lists
import org.hamcrest.Matchers.containsString
import org.junit.Assert.{assertEquals, assertFalse, assertTrue}
import org.junit.rules.{ExpectedException, TemporaryFolder}
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
import org.junit.{Before, Rule, Test}
import org.junit.{After, Before, Rule, Test}
import _root_.java.io.{File, FileOutputStream, OutputStreamWriter}
import _root_.java.lang.{Long => JLong}
......@@ -84,6 +82,11 @@ class TableEnvironmentITCase(tableEnvName: String) {
tEnv.registerTableSource("MyTable", getPersonCsvTableSource)
}
@After
def teardown(): Unit = {
StreamITCase.clear
}
@Test
def testExecuteTwiceUsingSameTableEnv(): Unit = {
val sink1Path = registerCsvTableSink(tEnv, Array("first"), Array(STRING), "MySink1")
......@@ -335,6 +338,7 @@ class TableEnvironmentITCase(tableEnvName: String) {
streamTableEnv.registerTableSource("MyTable", getPersonCsvTableSource)
val sink1Path = registerCsvTableSink(streamTableEnv, Array("first"), Array(STRING), "MySink1")
checkEmptyFile(sink1Path)
StreamITCase.clear
val table = streamTableEnv.sqlQuery("select last from MyTable where id > 0")
val resultSet = streamTableEnv.toAppendStream(table, classOf[Row])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册