Skip to content

[SPARK-55811] [SQL] Catch NonFatal instead of UnresolvedException when calling nodeWithOutputColumnsString#54600

Closed
mihailoale-db wants to merge 1 commit intoapache:masterfrom
mihailoale-db:fixunioninfoissue
Closed

[SPARK-55811] [SQL] Catch NonFatal instead of UnresolvedException when calling nodeWithOutputColumnsString#54600
mihailoale-db wants to merge 1 commit intoapache:masterfrom
mihailoale-db:fixunioninfoissue

Conversation

@mihailoale-db
Copy link
Contributor

What changes were proposed in this pull request?

SELECT 1L UNION SELECT 1

fails with CANNOT_MERGE_INCOMPATIBLE_DATA_TYPE when spark.sql.planChangeLog.level is set to info because we call Union.output too early (before type coercion is performed). In this PR I propose to fix it by catching NonFatal instead of UnresolvedException when calling nodeWithOutputColumnsString.

Why are the changes needed?

To fix an issue.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Added + existing tests.

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

No.

@mihailoale-db
Copy link
Contributor Author

@cloud-fan PTAL when you find time. Thanks!

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in f581d96 Mar 4, 2026
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.

2 participants