xuefuz commented on a change in pull request #9067: [FLINK-13069][hive] 
HiveTableSink should implement OverwritableTableSink
URL: https://github.com/apache/flink/pull/9067#discussion_r302313540
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/batch/connectors/hive/HiveTableOutputFormat.java
 ##########
 @@ -198,6 +199,7 @@ private void readObject(ObjectInputStream in) throws 
IOException, ClassNotFoundE
                tablePath = (ObjectPath) in.readObject();
                partitionToWriter = new HashMap<>();
                tableProperties = (Properties) in.readObject();
+               hiveVersion = 
jobConf.get(HiveCatalogValidator.CATALOG_HIVE_VERSION, 
HiveShimLoader.getHiveVersion());
 
 Review comment:
   I'm curious whether open() will be called after deserialization. If so, this 
isn't not necessary. Secondly, having this here makes deserialization not 
symmetric to serialization. If we have to have this, I'd include hiveVersion in 
the serialized fields.

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