[HUDI-8418] Throw an error if the table configs of record merge are about to change#12868
Open
wombatu-kun wants to merge 2 commits intoapache:masterfrom
Open
[HUDI-8418] Throw an error if the table configs of record merge are about to change#12868wombatu-kun wants to merge 2 commits intoapache:masterfrom
wombatu-kun wants to merge 2 commits intoapache:masterfrom
Conversation
4e4f3fd to
cef88ed
Compare
Contributor
Author
|
@hudi-bot run azure |
Contributor
|
cc @yihua to take care. |
Contributor
Author
|
@hudi-bot run azure |
0a22377 to
9d2569e
Compare
added 2 commits
March 6, 2025 06:39
9d2569e to
6603d51
Compare
Contributor
Author
|
@hudi-bot run azure |
Contributor
Author
|
@hudi-bot run azure |
yihua
reviewed
Mar 6, 2025
|
|
||
| public HoodieTableConfig(HoodieStorage storage, StoragePath metaPath, RecordMergeMode recordMergeMode, String payloadClassName, | ||
| String recordMergeStrategyId) { | ||
| this(storage, metaPath, recordMergeMode, payloadClassName, recordMergeStrategyId, true); |
Contributor
There was a problem hiding this comment.
From usability standpoint, could we add a config to allow payload class or merge mode/strategy update when enabled, and keep this config disabled by default, i.e., not allowing record merge mode/strategy to change unless user enables it in rare cases?
|
|
||
| //now using payload | ||
| assertEquals(DummyAvroPayload.class.getName(), props.get(HoodieTableConfig.PAYLOAD_CLASS_NAME.key())); | ||
| assertThrows(HoodieValidationException.class, () -> new HoodieDeltaStreamer(newCfg, jsc, fs, hiveServer.getHiveConf())); |
Contributor
There was a problem hiding this comment.
Could we add similar functional tests using Spark datasource and SQL writes to ensure that merge configs cannot be changed if enabled?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change Logs
By design, the merge mode configs should not change in the table configs after table creation. So we add this strict check and throw an error.
Impact
Merge mode and payload configs now unable to change after table creation.
Risk level (write none, low medium or high below)
none
Documentation Update
none
ticket number here and follow the instruction to make
changes to the website.
Contributor's checklist