feat: show MERGE INTO details in EXPLAIN - #26038
Open
wirybeaver wants to merge 1 commit into
Open
wirybeaver wants to merge 1 commit into
wirybeaver wants to merge 1 commit into
Conversation
Include the ON condition and WHEN clauses in text and PostgreSQL JSON logical-plan output for MERGE INTO.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #26038 +/- ##
=======================================
Coverage 82.66% 82.66%
=======================================
Files 1147 1147
Lines 446357 446426 +69
Branches 446357 446426 +69
=======================================
+ Hits 368971 369041 +70
+ Misses 54997 54982 -15
- Partials 22389 22403 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Which issue does this PR close?
Follow-up to the MERGE INTO review in #22988 and split from #24195. No separate issue.
Rationale for this change
Logical-plan output for
MERGE INTOcurrently shows onlyop=[MergeInto]. It omits theONcondition andWHENactions, which makesEXPLAINless useful for understanding or debugging a merge plan.What changes are included in this PR?
ONcondition and orderedWHEN ... THEN ...clauses in indented logical-plan output.Dmlrather thanProjection.This PR is independent of #24195 and targets
maindirectly. The two PRs only modify separate expectations in the sharedmerge_into.slttest file.What is the testing strategy for this PR?
cargo fmt --allcargo check -p datafusion-expr -p datafusion-sqlcargo test -p datafusion-expr write_op_merge_into_name_and_display -- --nocapturecargo test -p datafusion-sql plan_merge_into_preserves_target_qualifier_and_quoted_columns -- --nocapturecargo test --profile ci --test sqllogictests -- merge_into.slt --nocapturecargo clippy --all-targets --all-features -- -D warningsAre there any user-facing changes?
Yes.
EXPLAINtext and PostgreSQL JSON output forMERGE INTOnow include the merge condition and clauses. There are no public API signature changes.