wirybeaver opened a new pull request, #26038:
URL: https://github.com/apache/datafusion/pull/26038

   ## 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 INTO` currently shows only `op=[MergeInto]`. 
It omits the `ON` condition and `WHEN` actions, which makes `EXPLAIN` less 
useful for understanding or debugging a merge plan.
   
   ## What changes are included in this PR?
   
   - Adds display implementations for MERGE operations, clause kinds, clauses, 
and actions.
   - Includes the `ON` condition and ordered `WHEN ... THEN ...` clauses in 
indented logical-plan output.
   - Adds the same information to PostgreSQL JSON output and identifies DML 
nodes as `Dml` rather than `Projection`.
   - Adds text and JSON assertions covering aliases, quoted columns, 
predicates, updates, deletes, and inserts.
   
   This PR is independent of #24195 and targets `main` directly. The two PRs 
only modify separate expectations in the shared `merge_into.slt` test file.
   
   ## What is the testing strategy for this PR?
   
   - `cargo fmt --all`
   - `cargo check -p datafusion-expr -p datafusion-sql`
   - `cargo test -p datafusion-expr write_op_merge_into_name_and_display -- 
--nocapture`
   - `cargo test -p datafusion-sql 
plan_merge_into_preserves_target_qualifier_and_quoted_columns -- --nocapture`
   - `cargo test --profile ci --test sqllogictests -- merge_into.slt 
--nocapture`
   - `cargo clippy --all-targets --all-features -- -D warnings`
   - Full extended workspace test command from the contributor guide
   
   ## Are there any user-facing changes?
   
   Yes. `EXPLAIN` text and PostgreSQL JSON output for `MERGE INTO` now include 
the merge condition and clauses. There are no public API signature changes.
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to