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:
[email protected]


With regards,
Apache Git Services

Reply via email to