linliu-code opened a new pull request, #656:
URL: https://github.com/apache/hudi-rs/pull/656

   Independent of the merge-on-read reader port — this is about the 
**existing** read path.
   
   ## What I found
   
   `RecordMerger`'s append-only arm is:
   
   ```rust
   RecordMergeStrategyValue::AppendOnly => 
record_batches.concat_data_batches(self.schema.clone())
   ```
   
   `concat_data_batches` concatenates `data_batches` and returns. 
`delete_batches` is never read. **A deleted record is still in the result.**
   
   ## Why that is reachable
   
   Append-only is defensible for a table that genuinely only appends. But it is 
**not opt-in** — `config/table.rs` *derives* it:
   
   - `hoodie.populate.meta.fields = false` → `append_only`, or
   - no `hoodie.table.ordering.fields` / `precombine.field` → `append_only`
   
   A merge-on-read table meeting either condition has log files that can carry 
delete blocks. Those deletes are dropped, and updates are returned as 
duplicates rather than merged (the existing `test_merge_records_append_only` 
already documents the duplication — 4 rows out of 2+2 with a repeated key).
   
   ## Why it went unnoticed
   
   I checked every merge-on-read fixture in the repo: **all 14 set an ordering 
field and leave meta fields on**, so none derives append-only. The path has no 
fixture coverage at all.
   
   ## What this PR does
   
   Adds a test pinning the current behavior, so a change to it is deliberate 
rather than accidental. It does **not** change behavior — I did not want to 
alter existing read results in a test-only PR, and the right fix is a design 
question:
   
   - treat a merge-on-read table with delete blocks as never append-only, or
   - apply deletes on the append-only path too, or
   - reject the combination loudly
   
   Worth a maintainer's call. This came up because the ported merge-on-read 
reader has no append-only equivalent — it always merges by key — so the same 
table would return different rows under it.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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

Reply via email to