rdblue commented on code in PR #18108:
URL: https://github.com/apache/iceberg/pull/18108#discussion_r4159044560
##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -161,6 +165,19 @@ private TrackedFile applyInheritance(TrackedFile file) {
return file;
}
+ private TrackedFile projectPartition(TrackedFile file) {
+ Integer specId = file.specId();
+ StructProjection projection = specId != null ?
partitionProjections.get(specId) : null;
+ TrackedFileStruct struct = (TrackedFileStruct) file;
+ if (specId != null && projection == null) {
Review Comment:
Should this check be that `projection` is not present, rather than null?
I think we are using `null` to signal to `TrackedFile` that no projection is
necessary. That's why when the projection is null, we return the partition
directly. So we could have a case where the spec ID was present in the map, but
the value was null. In that case, we don't want to clear the partition value.
--
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]