[
https://issues.apache.org/jira/browse/HIVE-16050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886464#comment-15886464
]
Gopal V commented on HIVE-16050:
--------------------------------
Yup, right at the top of the function.
{code}
if (a.equals(b)) {
return a;
}
{code}
Without that equals at the top, the code will convert a union of 2 Dates into
a timestamp column.
Beyond that case, I'm extremely suspicious of all the .q changes in HIVE-14251,
if they all represent a query which worked in 2.1.x and won't in 2.2.x branch.
> Regression: Union of null with non-null
> ----------------------------------------
>
> Key: HIVE-16050
> URL: https://issues.apache.org/jira/browse/HIVE-16050
> Project: Hive
> Issue Type: Bug
> Components: Query Planning
> Affects Versions: 2.2.0
> Reporter: Gopal V
> Assignee: Gopal V
> Fix For: 2.2.0
>
> Attachments: HIVE-16050.1.patch
>
>
> {code}
> hive> select null as c1 union select 1 as c2;
> FAILED: SemanticException Schema of both sides of union should match:
> Column c1 is of type void on first table and type int on second table. Cannot
> tell the position of null AST.
> {code}
> This looks related to HIVE-14251 which removed certain cases from the UNION
> type coercion operations.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)