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

   ### Change Logs
   
   Reading a Merge-on-Read table on **table version < 9** returns unchanged 
Postgres TOASTed columns
   (ingested via Debezium) as the `__debezium_unavailable_value` placeholder 
instead of the prior base
   value.
   
   `PostgresDebeziumAvroPayload#combineAndGetUpdateValue` fills the sentinel 
columns from the base record
   by mutating the incoming Avro record **in place** and returning that same 
reference.
   `HoodieAvroRecordMerger#merge` short-circuited `updatedRecord == 
newerAvroRecord` by returning the
   original engine-backed `newer` `BufferedRecord` — a *separate* object from 
the mutated `newerAvroRecord`
   — which discarded the fill. Table version 9 is unaffected because it applies 
toasted handling through
   the `FILL_UNAVAILABLE` partial-update path, not the payload merger.
   
   This removes the short-circuit so the (possibly mutated) `updatedRecord` is 
always converted back via
   the existing fall-through. Adds `TestDebeziumToastedValue` covering table 
versions 6, 8 and 9.
   
   ### Impact
   
   Correct TOASTed-column values for Debezium Postgres MOR reads on table 
versions 6/8. No behavior change
   for payloads that do not mutate in place (the merger rebuilds from the same 
result); the only cost is
   one extra record conversion on the custom (payload-based) merge path.
   
   ### Risk level: low
   
   Covered by a new functional test (`TestDebeziumToastedValue`) across table 
versions 6, 8 and 9.
   
   ### Documentation Update
   
   N/A
   
   ### Contributor's checklist
   
   - [ ] Read through the [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Change Logs and Impact described above
   - [ ] (JIRA to be linked)
   
   🤖 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