[SPARK-56669][SQL] Implement group filtering for WriteDelta row level operations#55635
Closed
gengliangwang wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-56669][SQL] Implement group filtering for WriteDelta row level operations#55635gengliangwang wants to merge 2 commits intoapache:masterfrom
gengliangwang wants to merge 2 commits intoapache:masterfrom
Conversation
… operations ### What changes were proposed in this pull request? This PR implement group filtering for WriteDelta row level operations. ### Why are the changes needed? These changes are needed to close the gap in WriteDelta plans. ### Does this PR introduce _any_ user-facing change? Changes are backward compatible. ### How was this patch tested? This PR comes with tests. ### Was this patch authored or co-authored using generative AI tooling? Claude Code v2.1.123. Closes apache#55612 from aokolnychyi/spark-56669. Authored-by: Anton Okolnychyi <aokolnychyi@apache.org> Signed-off-by: Gengliang Wang <gengliang@apache.org>
…r WriteDelta group filtering The previous commit added group filtering for WriteDelta row level operations but missed updating scan-count assertions in the transactional check tests in MergeIntoTableSuiteBase and UpdateTableSuiteBase, which still assumed the old delta behavior. With group filtering, matchingRowsPlan re-scans the target, and for MERGE RewritePredicateSubquery also re-scans the source. For MERGE the delta scan counts now match the non-delta values, so the deltaMerge conditionals collapse. For UPDATE the delta counts double but remain under the non-delta values because ReplaceData adds further scans.
Member
Author
|
I will just merge this re-apply commit to catch the branch cut. |
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.
What changes were proposed in this pull request?
This PR implements group filtering for WriteDelta row level operations.
It re-applies #55612 (commit
5ef2e1ba174, reverted in8e8fee2692f) and resolves the test failures reported in #55612 (comment) by updating the scan-count assertions in the transactional check tests inMergeIntoTableSuiteBaseandUpdateTableSuiteBase. With group filtering,matchingRowsPlanre-scans the target, and for MERGERewritePredicateSubqueryalso re-scans the source. For MERGE the delta scan counts now match the non-delta values, so thedeltaMergeconditionals collapse. For UPDATE the delta counts double but remain under the non-delta values becauseReplaceDatastill adds further scans.Why are the changes needed?
These changes are needed to close the gap in WriteDelta plans.
Does this PR introduce any user-facing change?
Changes are backward compatible.
How was this patch tested?
This PR comes with tests. Locally verified all 9 affected suites are green (517 tests):
Was this patch authored or co-authored using generative AI tooling?
Claude Code v2.1.123.