You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/07/16 16:46:25 UTC

[GitHub] [flink] bowenli86 commented on a change in pull request #9088: [FLINK-13012][hive] Handle default partition name of Hive table

bowenli86 commented on a change in pull request #9088: [FLINK-13012][hive] Handle default partition name of Hive table
URL: https://github.com/apache/flink/pull/9088#discussion_r304007767
 
 

 ##########
 File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/batch/connectors/hive/HiveTableOutputFormat.java
 ##########
 @@ -312,7 +317,11 @@ public void writeRecord(Row record) throws IOException {
 				for (int i = dynamicPartitionOffset; i < record.getArity(); i++) {
 					// TODO: seems Hive also just calls toString(), need further investigation to confirm
 					// TODO: validate partition value
-					String partVal = record.getField(i).toString();
+					Object field = record.getField(i);
+					String partVal = field != null ? field.toString() : null;
 
 Review comment:
   nit: can we use full name as `partitionValue`?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services