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

   ### Describe the issue this Pull Request addresses
   
   MetaFieldsMode.toLegacyPopulateMetaFields() returned true only for ALL, so 
every selective mode derived the deprecated hoodie.populate.meta.fields as 
false. That boolean has two states and false carries exactly one meaning -- no 
meta columns at all -- so it misdescribes any mode that populates at least one. 
COMMIT_TIME_ONLY, FILE_NAME_ONLY and COMMIT_TIME_AND_FILE_NAME all populate 
_hoodie_commit_time and/or _hoodie_file_name.
   
   The value is persisted into hoodie.properties alongside the mode, for 
readers and writers that predate hoodie.meta.fields.mode. Such a writer cannot 
see the mode, reads the boolean as "meta fields disabled", defaults its own to 
true, and is then rejected by HoodieTableMetaClient.validateTableProperties:
   
   
   That guard is a pure property comparison and never inspects a file, so it 
fires on tables whose base files do carry meta columns. The result is that a 
table written once with a selective mode can no longer be written by an older 
writer against the same base path, which breaks mixed-version operation during 
an upgrade.
   
   Only NONE now maps to false. The resolve() fallback direction is unchanged 
(true -> ALL, false -> NONE), as is the default: META_FIELDS_MODE carries no 
default value and resolves to ALL through the legacy boolean, so a table that 
sets no mode behaves exactly as before.
   
   isRecordKeyPopulated() is likewise unchanged, so BLOOM/GLOBAL_BLOOM index 
validation and bloom-filter writing still correctly exclude the modes that omit 
the record key. The boolean reports whether any meta columns exist, never which 
ones; callers needing a specific column must ask for that column.
   
   ### Summary and Changelog
   
   <!-- Short, plain-English summary of what users gain or what changed in 
behavior.
        Followed by a detailed log of all the changes. Highlight if any code 
was copied. -->
   
   ### Impact
   
   <!-- Describe any public API or user-facing feature change or any 
performance impact. -->
   
   ### Risk Level
   
   <!-- Accepted values: none, low, medium or high. Other than `none`, explain 
the risk.
        If medium or high, explain what verification was done to mitigate the 
risks. -->
   
   ### Documentation Update
   
   <!-- Describe any necessary documentation update if there is any new 
feature, config, or user-facing change. If not, put "none".
   
   - The config description must be updated if new configs are added or the 
default value of the configs are changed.
   - Any new feature or user-facing change requires updating the Hudi website. 
Please follow the 
     [instruction](https://hudi.apache.org/contribute/developer-setup#website) 
to make changes to the website. -->
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] 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