lirui-apache 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_r304258699
 
 

 ##########
 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:
   For a string partition column, it'll be assigned the default value, e.g. 
`__HIVE_DEFAULT_PARTITION__`. But I thought it should simply be null, just like 
other kinds of partition columns.

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