You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2025/06/23 12:28:00 UTC
[jira] [Resolved] (SPARK-52462) Enforce type coercion before children output deduplication in Union
[ https://issues.apache.org/jira/browse/SPARK-52462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-52462.
---------------------------------
Fix Version/s: 4.1.0
Resolution: Fixed
Issue resolved by pull request 51172
[https://github.com/apache/spark/pull/51172]
> Enforce type coercion before children output deduplication in Union
> -------------------------------------------------------------------
>
> Key: SPARK-52462
> URL: https://issues.apache.org/jira/browse/SPARK-52462
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 4.1.0
> Reporter: Mihailo Aleksic
> Assignee: Mihailo Aleksic
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.1.0
>
>
> Right now, query the following query produces plans that are not consistent over different underlying table providers. Query:
> SELECT col1, col2, col3, NULLIF('','') AS col4
> FROM table
> UNION ALL
> SELECT col2, col2, null AS col3, col4
> FROM table;
> This happens because of rule ordering:
> - Sometimes: ... -> WidenSetOperationTypes -> ... -> ResolveReferences (deduplication of Union children outputs) -> ...
> - Sometimes: ... -> ResolveReferences (deduplication of Union children outputs) -> ... -> WidenSetOperationTypes -> ...
> In this issue I propose that we align those two by enforcing type coercion to happen before deduplication.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org