deniskuzZ commented on PR #6259:
URL: https://github.com/apache/hive/pull/6259#issuecomment-3781337469

   > Thanks @deniskuzZ for the help regarding the partition transforms fix 
adding on to it:
   > 
   > * updated `desc_ice_tbl_part_spec.q `for covering this scenario
   > * used `Map<String, String> expectedSpec` instead of `String expectedName` 
as due to transforms for eg. cols like `b` can change to `b_trunc_2 `and 
similar name gets returned via getPartitionNames so spec size comparison will 
be enough as size will only be same if it is the corresponding partition 
otherwise size will be greater for other having it as subset
   > * used
   > 
   > ```
   > Map<String, PartitionField> partitionFieldMap = 
getPartitionFields(icebergTable, latestSpecOnly).stream()
   >         .collect(Collectors.toMap(
   >             f -> icebergTable.schema()
   >                 .findField(f.sourceId())
   >                 .name(),
   >             Function.identity()
   >         ));
   > ```
   > 
   > in place of
   > 
   > ```
   > Map<String, PartitionField> partitionFieldMap = Maps.newHashMap();
   >     getPartitionFields(table, latestSpecOnly).forEach(field -> {
   >       String sourceName = table.schema().findColumnName(field.sourceId());
   >       partitionFieldMap.put(sourceName.toLowerCase(), field);
   >       partitionFieldMap.put(field.name().toLowerCase(), field);
   >     });
   > ```
   > 
   > as filling in single source name should be enough
   > 
   > please take a look if any other refractor or other changes needed
   
   That is not enough; it would fail on residual expression.
   see complete changes in 
https://github.com/apache/hive/pull/6275/commits/e6261b886a01facaf9ef95ea6a0b07d1f9711ec7


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