You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
compact_chain_table(..., partial partition, overwrite=true) may cause data loss. Using the partial partitionSpec in sinkBuilder.overwrite(partitionSpec) will delete all groups under the specified partial partition in the snapshot branch. However, the source side's skipPreloadTargetSnapshot only generates output from target chain partitions present in the delta. If a snapshot group already exists but has no corresponding delta in the target chain partition, it will be overwritten and deleted without being rewritten. The author is advised to add a scenario: partitioned by (region, dt, hr), chain keys (dt, hr), with a snapshot containing region=FR, dt=..., hr=..., and a delta only including region=CN, dt=..., hr=.... After executing compact_chain_table('dt=..., hr=...', true), the FR data should not be lost.
compact_chain_table(..., partial partition, overwrite=true) may cause data loss. Using the partial partitionSpec in sinkBuilder.overwrite(partitionSpec) will delete all groups under the specified partial partition in the snapshot branch. However, the source side's skipPreloadTargetSnapshot only generates output from target chain partitions present in the delta. If a snapshot group already exists but has no corresponding delta in the target chain partition, it will be overwritten and deleted without being rewritten. The author is advised to add a scenario: partitioned by (region, dt, hr), chain keys (dt, hr), with a snapshot containing region=FR, dt=..., hr=..., and a delta only including region=CN, dt=..., hr=.... After executing compact_chain_table('dt=..., hr=...', true), the FR data should not be lost.
Thank you for pointing this out.
I updated CompactChainTableAction to always enable dynamic-partition-overwrite internally when compacting, so only full partitions present in the compacted DataFrame are overwritten and other groups are preserved regardless of the table-level setting.
I also verified that the same issue exists in the Spark compact_chain_table implementation. I have submitted a separate PR(#8529) to fix it there as well.
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
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.
Purpose
see #8503
Tests