Skip to content

[WIP][SQL] Fix multi-value UNPIVOT with mixed types - #58810

Open
stevomitric wants to merge 1 commit into
apache:masterfrom
stevomitric:fix-unpivot-exclude-nulls-mixed-types
Open

stevomitric wants to merge 1 commit into
apache:masterfrom
stevomitric:fix-unpivot-exclude-nulls-mixed-types

Conversation

@stevomitric

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Replace multi-value UNPIVOT’s COALESCE null filter with independent IS NOT NULL checks joined by OR. Add parser and mixed-type regression tests.

Why are the changes needed?

COALESCE requires a common type, causing valid UNPIVOT queries with unrelated value types, such as DATE and INT, to fail analysis.

Does this PR introduce any user-facing change?

Yes. Multi-value UNPIVOT EXCLUDE NULLS now supports mixed types and removes only rows where every value is null.

How was this patch tested?

New test in the PR.

Was this patch authored or co-authored using generative AI tooling?

Co-Authored-by: OpenAI Codex (GPT-5)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant