xuefuz commented on a change in pull request #9342: [FLINK-13438][hive] Fix 
DataTypes.DATE/TIME/TIMESTAMP support for hive connectors
URL: https://github.com/apache/flink/pull/9342#discussion_r310790692
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveTableSink.java
 ##########
 @@ -74,10 +76,13 @@
        public HiveTableSink(JobConf jobConf, ObjectPath tablePath, 
CatalogTable table) {
                this.jobConf = jobConf;
                this.tablePath = tablePath;
-               this.catalogTable = table;
+
+               Preconditions.checkArgument(table instanceof CatalogTableImpl);
+               this.catalogTable = HiveTableUtil.toHiveCatalogTable(table);
 
 Review comment:
   It seems that all we  need is to change some field types to their bridged 
ones. This can be done by building a new TableSchema from the original 
TableSchema. In other word, we don't need to create a new CatalogTable 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to