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_r308867419
 
 

 ##########
 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:
   Casting is fine, but can we name the variable differently?

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