kevinjqliu commented on issue #13833:
URL: https://github.com/apache/iceberg/issues/13833#issuecomment-3208186526

   thats a good one. Here's the call stack for this bug:
   `updateSpec()` [calls 
`PartitionSpec.Builder.add()`](https://github.com/apache/iceberg/blob/d5e3a56b3150b0e97adf52673526104d01e3aaa6/core/src/main/java/org/apache/iceberg/BaseUpdatePartitionSpec.java#L313),
 which [passes `name` and `sourceId` to 
`checkAndAddPartitionName`](https://github.com/apache/iceberg/blob/d5e3a56b3150b0e97adf52673526104d01e3aaa6/api/src/main/java/org/apache/iceberg/PartitionSpec.java#L615-L620)
   Because [`sourceColumnId` is provided, 
`checkAndAddPartitionName`](https://github.com/apache/iceberg/blob/d5e3a56b3150b0e97adf52673526104d01e3aaa6/api/src/main/java/org/apache/iceberg/PartitionSpec.java#L404)
 goes to the if statement which handles identity transform. 
   
   This is a great illustration of why refactoring `checkAndAddPartitionName` 
to be more explicit in #13835 helps prevent bugs 


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