hudi-agent commented on code in PR #20333:
URL: https://github.com/apache/hudi/pull/20333#discussion_r4284351056
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -2462,8 +2462,23 @@ public static Map<String, HoodieMetadataFileInfo>
combineFileSystemMetadata(Hood
}
return null;
}
+ // Where a file lives never changes while it exists under the
same name, so the two
+ // records can only ever carry the same source partition path,
and taking whichever
+ // one is set is commutative. Two different paths means the name
was reused for a
+ // file elsewhere, which ordering cannot resolve either: pick
the same one whichever
+ // way the records arrive, so readers merging in different
orders at least agree.
+ String oldSourcePartitionPath =
oldFileInfo.getSourcePartitionPath();
+ String newSourcePartitionPath =
newFileInfo.getSourcePartitionPath();
+ String sourcePartitionPath =
Review Comment:
🤖 nit: could you move the source-path resolution into a small helper like
`resolveSourcePartitionPath(oldInfo, newInfo, key)`, so the lambda doesn't
assign `sourcePartitionPath` and then overwrite it in the conflict branch?
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
--
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]