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

   … table that carries a mode
   
   hoodie.meta.fields.mode (#19205) is the source of truth for meta-column 
population and the deprecated hoodie.populate.meta.fields boolean is consulted 
only when the mode is absent. That contract held only for table version 10, 
which persists the mode alone. Tables below version 10 persist the derived 
boolean next to the mode for unpatched readers, and the key-by-key conflict 
loop in HoodieWriterUtils.validateTableConfig compared a writer's legacy 
boolean against that persisted copy before the mode-wins logic ever ran. A 
writer stating hoodie.populate.meta.fields=true against a NONE table pinned at 
v6/v8/v9 (hoodie.write.table.version, or auto-upgrade disabled) was therefore 
rejected with a generic "Config conflict", while the identical write against a 
v10 table was accepted.
   
   Skip the legacy boolean in that loop once the table carries a mode. The mode 
comparison in the same method and
   BaseHoodieWriteClient#validateAgainstTableProperties still enforce agreement 
on the resolved mode, and tables that predate the property keep the boolean 
comparison.
   
   Tests:
   - TestHoodieWriterUtils: a v9 table (mode plus persisted boolean) accepts a 
contradicting legacy boolean for both NONE and ALL; a legacy-shaped table 
(boolean only) still rejects it.
   - testLegacyBooleanDoesNotOverrideDisabledMetaFields in 
TestHoodieSparkSqlWriter and TestHoodieSparkSqlWriterWithTestFormat now run 
across every writable table version (6/8/9/10; the test table format cannot 
write v6 timelines, so 8/9/10 there) instead of only the default. Without the 
fix the sub-10 parameters fail and 10 passes.
   
   ### Describe the issue this Pull Request addresses
   
   <!-- Either describe the issue inline here with motivation behind the 
changes 
        (or) link to an issue by including `Closes #<issue-number>` for 
context. 
        If this PR includes changes to the storage format, public APIs,
        or has breaking changes, use `!` (e.g., feat!: ...) -->
   
   ### 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