Skip to content

Conversation

mbautin
Copy link

@mbautin mbautin commented Oct 27, 2015

@mbautin
Copy link
Author

mbautin commented Oct 27, 2015

Local build finished, merging.

mbautin added a commit that referenced this pull request Oct 27, 2015
@mbautin mbautin merged commit 9c5ae03 into alteryx:csd-1.5 Oct 27, 2015
markhamstra pushed a commit to markhamstra/spark that referenced this pull request Nov 7, 2017
markhamstra pushed a commit to markhamstra/spark that referenced this pull request May 14, 2018
## What changes were proposed in this pull request?
Union of map and other compatible column result in unresolved operator 'Union; exception

Reproduction
`spark-sql>select map(1,2), 'str' union all select map(1,2,3,null), 1`
Output:
```
Error in query: unresolved operator 'Union;;
'Union
:- Project [map(1, 2) AS map(1, 2)alteryx#106, str AS str#107]
:  +- OneRowRelation$
+- Project [map(1, cast(2 as int), 3, cast(null as int)) AS map(1, CAST(2 AS INT), 3, CAST(NULL AS INT))alteryx#109, 1 AS 1#108]
   +- OneRowRelation$
```
So, we should cast part of columns to be compatible when appropriate.

## How was this patch tested?
Added a test (query union of map and other columns) to SQLQueryTestSuite's union.sql.

Author: liutang123 <[email protected]>

Closes apache#21100 from liutang123/SPARK-24012.
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