xuefuz commented on a change in pull request #8890: [FLINK-12989][hive]: 
Generate HiveTableSink from from a Hive table
URL: https://github.com/apache/flink/pull/8890#discussion_r298266064
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/batch/connectors/hive/HiveTableSinkTest.java
 ##########
 @@ -113,8 +114,8 @@ public void testInsertIntoDynamicPartition() throws 
Exception {
                tableEnv.registerDataSet("src", execEnv.fromCollection(toWrite, 
rowTypeInfo));
 
                Table hiveTable = hiveCatalog.getHiveTable(tablePath);
-               tableEnv.registerTableSink("destSink", new HiveTableSink(new 
JobConf(hiveConf), rowTypeInfo,
-                               "default", "dest", 
HiveCatalog.getFieldNames(hiveTable.getPartitionKeys())));
+               CatalogBaseTable table = hiveCatalog.getTable(tablePath);
+               tableEnv.registerTableSink("destSink", new HiveTableSink(new 
JobConf(hiveConf), tablePath, (CatalogTableImpl) table));
 
 Review comment:
   HiveTableSink constructor requires a CatalogTableImpl instance.

----------------------------------------------------------------
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

Reply via email to