voonhous commented on PR #20888: URL: https://github.com/apache/hudi/pull/20888#issuecomment-7213106823
Thanks for the fix! I'll push the test changes below to this branch, then approve. **Add tests** - GLOBAL_SIMPLE and GLOBAL_BLOOM with the source row in another partition than the target: a delete-only statement, and one that moves id 1 to `d2` while deleting id 2. On master the first keeps the row and the second fails; neither reaches the global index branches at `HoodieIndexUtils.java:537` and `:555` in the current tests. - A refusal case where the record index was built by an earlier write and the MERGE INTO session does not set the flag, so the `isMetadataPartitionAvailable(RECORD_INDEX)` check is pinned (today only the global flag is). - A `TestHoodieAvroRecord` unit test for the cache reset: a cached false is evaluated again with `decidesDeleteOnWrite`, while a cached true and other payloads keep theirs. - A keyless MOR case with a partial update (`update set name = s.name, ts = s.ts`) next to the delete clause. **Fix comments** - The delete-only statement is skipped without an ordering field because it silently deletes nothing (it runs as an INSERT and the payload returns the sentinel, same on master), which #20897 fixes. The comment now says that instead of "written as an insert". - The SIMPLE index works on master because `HoodieIndexUtils.tagAsNewRecordIfNeeded` calls `newInstance()`, whose copy constructor drops the cached value; the comment above the matrix now gives that reason. **Trim tests** - Drop the keyless COW case, which overlaps the existing test at `:303`. - Drop the SIMPLE cells, which pass with or without the fix. - Drop GLOBAL_BLOOM from the matrix, since it tags the same way as GLOBAL_SIMPLE (it stays in the cross-partition case). - Drop the second source row for id 1, which does not isolate the combining step. - Fold the lower-ordering-value delete into the GLOBAL_SIMPLE cell and drop the separate event-time test. - Drop the unchanged-rows checks after a refusal, since `validate` throws before any write. - Share the create-table and insert setup through a small helper. -- 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]
