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_r310218554
########## File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/connectors/hive/HiveTableOutputFormat.java ########## @@ -259,13 +259,13 @@ public void configure(Configuration parameters) { public void open(int taskNumber, int numTasks) throws IOException { try { StorageDescriptor sd = hiveTablePartition.getStorageDescriptor(); - serializer = (Serializer) Class.forName(sd.getSerdeInfo().getSerializationLib()).newInstance(); - Preconditions.checkArgument(serializer instanceof Deserializer, - "Expect to get a SerDe, but actually got " + serializer.getClass().getName()); - ReflectionUtils.setConf(serializer, jobConf); + recordSerDe = (Serializer) Class.forName(sd.getSerdeInfo().getSerializationLib()).newInstance(); Review comment: Can we assert the type to be "Serializer" before casting it, similar to below for "Deserializer"? ---------------------------------------------------------------- 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