bowenli86 commented on a change in pull request #9181: [FLINK-13210][hive] Hive
connector test should dependent on blink planner instead of legacy planner
URL: https://github.com/apache/flink/pull/9181#discussion_r305440185
##########
File path:
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/batch/connectors/hive/HiveTableSinkTest.java
##########
@@ -104,14 +113,15 @@ public void testInsertIntoDynamicPartition() throws
Exception {
RowTypeInfo rowTypeInfo = createDestTable(dbName, tblName, 1);
ObjectPath tablePath = new ObjectPath(dbName, tblName);
- ExecutionEnvironment execEnv =
ExecutionEnvironment.createLocalEnvironment(1);
- BatchTableEnvironment tableEnv =
BatchTableEnvironment.create(execEnv);
+ TableEnvironment tableEnv = HiveTestUtils.createTableEnv();
+
List<Row> toWrite = generateRecords(5);
- tableEnv.registerDataSet("src", execEnv.fromCollection(toWrite,
rowTypeInfo));
+ Table src = tableEnv.fromTableSource(new
CollectionTableSource(toWrite, rowTypeInfo));
+ tableEnv.registerTable("src", src);
tableEnv.registerCatalog("hive", hiveCatalog);
tableEnv.sqlQuery("select * from src").insertInto("hive",
"default", "dest");
- execEnv.execute();
+ tableEnv.execute(null);
Review comment:
ditto
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services