a-narsudinov opened a new pull request, #20641:
URL: https://github.com/apache/hudi/pull/20641

   ### Describe the issue this Pull Request addresses
   
   Metadata-only bootstrap files contain a Hudi metadata skeleton, while their 
data columns reside in a mapped external base file. The Trino connector 
currently builds splits from the skeleton’s path and size, causing reads to 
access the wrong file and potentially return null data columns.
   
   Snapshot reads that combine bootstrap files with logs also require 
coordinated reads of the skeleton and external data, which the current merge 
reader does not support.
   
   ### Summary and Changelog
   
   Read bootstrap data from its external base file and explicitly reject 
unsupported merge scenarios.
   
   - Resolve the external bootstrap `BaseFile` before calculating split ranges.
   - Use the external file’s path, size and modification time in generated 
splits.
   - Add `BaseFile` overloads to `HudiBaseFile`, retaining the existing 
`HoodieBaseFile` overloads.
   - Reject metadata-only bootstrap files combined with logs in snapshot reads 
using `NOT_SUPPORTED`.
   - Preserve external base-file reads in read-optimized mode, including when 
logs exist.
   - Add focused Parquet-read and split-planning tests.
   
   Validation: all three tests across `TestHudiBootstrapRead` and 
`TestHudiBootstrapSplits` passed.
   
   ### Impact
   
   Restores data-column reads from metadata-only bootstrapped tables. 
Unsupported bootstrap snapshot merges now fail explicitly during split planning 
instead of reading skeleton data.
   
   No configuration or storage-format changes.
   
   ### Risk Level
   
   medium — The change affects physical file selection and split boundaries for 
bootstrapped tables, and explicitly rejects an unsupported snapshot-read 
combination.
   
   Tests verify reading external Parquet data, contiguous split ranges covering 
an external file larger than its skeleton, file metadata propagation, rejection 
of bootstrap snapshot merges with logs, and the supported read-optimized 
alternative.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable


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