shangxinli opened a new pull request, #20333:
URL: https://github.com/apache/hudi/pull/20333

   ### Describe the issue this Pull Request addresses
   
   Part of #18135 (REGISTER_ONLY bootstrap). Today a FILES partition entry is 
just a file name, resolved against the table's partition path, so the metadata 
table can only ever address files it owns. Registering existing files in place 
needs a way to say where a file actually lives.
   
   ### Summary and Changelog
   
   Adds an optional `sourceBasePath` to `HoodieMetadataFileInfo`. When set, 
`getFileList` resolves the entry against that path instead of the table's 
partition path; when null (every file written today) nothing changes.
   
   - `HoodieMetadata.avsc`: new nullable `sourceBasePath` field, default null.
   - `HoodieMetadataPayload`: new `createPartitionFilesRecord` overload taking 
file -> source base path; existing overload delegates with an empty map.
   - `HoodieTableMetadataUtil`: merging two file infos keeps whichever source 
base path is set.
   - `HoodieWriteStat`: new nullable `sourceBasePath`, plumbed into the FILES 
records by `FilesIndexer`.
   
   Nothing in the tree sets it yet; the bootstrap write path that does is the 
next PR.
   
   ### Impact
   
   None for existing tables. The field is optional with a null default, so old 
readers skip it and new readers see null on old records.
   
   ### Risk Level
   
   low
   
   Unit test covers resolution with and without the field set, and 
deserialization of a record written without it.
   
   ### 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