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:47:35 UTC

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

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

 ##########
 File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/batch/connectors/hive/HiveTableSource.java
 ##########
 @@ -160,7 +162,14 @@ private void initAllPartitions() {
 						String partitionValue = partition.getValues().get(i);
 						partitionSpec.put(partitionColName, partitionValue);
 						DataType type = catalogTable.getSchema().getFieldDataType(partitionColName).get();
-						Object partitionObject = restorePartitionValueFromFromType(partitionValue, type);
+						Object partitionObject;
+						if (defaultPartitionName.equals(partitionValue)) {
+							LogicalTypeRoot typeRoot = type.getLogicalType().getTypeRoot();
+							// while this is inline with Hive, seems it should be null for string columns as well?
 
 Review comment:
   Hive also has String type. What's Hive's behavior on this?

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