xuefuz commented on a change in pull request #9264: [FLINK-13192][hive] Add 
tests for different Hive table formats
URL: https://github.com/apache/flink/pull/9264#discussion_r308358142
 
 

 ##########
 File path: 
flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/batch/connectors/hive/HiveTableOutputFormat.java
 ##########
 @@ -256,10 +258,12 @@ public void configure(Configuration parameters) {
        public void open(int taskNumber, int numTasks) throws IOException {
                try {
                        StorageDescriptor sd = 
hiveTablePartition.getStorageDescriptor();
-                       serializer = (AbstractSerDe) 
Class.forName(sd.getSerdeInfo().getSerializationLib()).newInstance();
+                       serializer = (Serializer) 
Class.forName(sd.getSerdeInfo().getSerializationLib()).newInstance();
+                       Preconditions.checkArgument(serializer instanceof 
Deserializer,
 
 Review comment:
   Not sure if I understand this. Interfaces Serializer and Deserializer are 
independent. While a serde class may implement both, it seem weird to name a 
variable "serializer" and later cast it to Deserializer type. 

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