hudi-agent commented on code in PR #19845:
URL: https://github.com/apache/hudi/pull/19845#discussion_r3974977783
##########
hudi-common/src/main/java/org/apache/hudi/common/model/MetaFieldsMode.java:
##########
@@ -114,7 +112,7 @@ public boolean isRecordKeyPopulated() {
* <p>These are the modes the deprecated {@code hoodie.populate.meta.fields}
boolean cannot
* express, so they are what callers gate on when a code path only
understands all-or-nothing meta
* fields — writer engines not yet wired for selective population, table
versions that predate the
- * mode property, and validation that must not let a two-state writer speak
for a five-state table.
+ * mode property, and validation that must not let a two-state writer speak
for a selective-mode table.
Review Comment:
🤖 nit: now that commit-time/file-name/seqno/partition-path are all backed by
explicit constructor fields, `isRecordKeyPopulated()` is the only flag still
hardcoded as `this == ALL`. Since `ALL` and `ALL_EXCEPT_RECORD_KEY` otherwise
have identical boolean tuples, it might be worth adding a `recordKeyPopulated`
field too so a future mode addition doesn't forget to update this one-off check.
<sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag
quality.</i></sub>
##########
hudi-common/src/test/java/org/apache/hudi/common/model/TestMetaFieldsMode.java:
##########
@@ -164,12 +169,54 @@ void recordKeyIsPopulatedOnlyByAll() {
"COMMIT_TIME_AND_FILE_NAME, NONE, true",
"COMMIT_TIME_AND_FILE_NAME, COMMIT_TIME_ONLY, true",
"COMMIT_TIME_AND_FILE_NAME, FILE_NAME_ONLY, true",
- "COMMIT_TIME_AND_FILE_NAME, COMMIT_TIME_AND_FILE_NAME, false"
+ "COMMIT_TIME_AND_FILE_NAME, COMMIT_TIME_AND_FILE_NAME, false",
+ "ALL, ALL_EXCEPT_RECORD_KEY, true",
Review Comment:
🤖 nit: the column alignment breaks down for the new ALL_EXCEPT_RECORD_KEY
rows (extra/missing spaces compared to the rest of the matrix) — worth aligning
them the same way as the existing rows for consistency.
<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]