deniskuzZ commented on code in PR #6515:
URL: https://github.com/apache/hive/pull/6515#discussion_r3337031576


##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -2316,8 +2316,8 @@ public List<Partition> 
getPartitionsByExpr(org.apache.hadoop.hive.ql.metadata.Ta
             PartitionData partitionData = 
IcebergTableUtil.toPartitionData(task.partition(), spec.partitionType());
             String partName = spec.partitionToPath(partitionData);
 
-            Map<String, String> partSpecMap = Maps.newLinkedHashMap();
-            Warehouse.makeSpecFromName(partSpecMap, new Path(partName), null);

Review Comment:
    The other call sites (e.g. 
IcebergTableUtil#convertNameToMetastorePartition) don't have access to 
partitionData — they only receive the partition path string. Without the 
underlying partition data, there's no way to disambiguate whether "null" in the 
path originated from a true NULL value or from a literal string "null". The fix 
here works precisely because we have partitionData available to check the 
actual value. If those other paths turn out to be affected, they'd need a 
different approach to obtain that context.
   note: IcebergQueryCompactor should be fine — it deals with compaction where 
NULL filtering semantics aren't in play



##########
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergStorageHandler.java:
##########
@@ -2316,8 +2316,8 @@ public List<Partition> 
getPartitionsByExpr(org.apache.hadoop.hive.ql.metadata.Ta
             PartitionData partitionData = 
IcebergTableUtil.toPartitionData(task.partition(), spec.partitionType());
             String partName = spec.partitionToPath(partitionData);
 
-            Map<String, String> partSpecMap = Maps.newLinkedHashMap();
-            Warehouse.makeSpecFromName(partSpecMap, new Path(partName), null);

Review Comment:
    The other call sites (e.g. 
IcebergTableUtil#convertNameToMetastorePartition) don't have access to 
partitionData — they only receive the partition path string. Without the 
underlying partition data, there's no way to disambiguate whether "null" in the 
path originated from a true NULL value or from a literal string "null". The fix 
here works precisely because we have partitionData available to check the 
actual value. If those other paths turn out to be affected, they'd need a 
different approach to obtain that context.
   **note**: IcebergQueryCompactor should be fine — it deals with compaction 
where NULL filtering semantics aren't in play



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to