hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Thusoo (JIRA)" <>
Subject [jira] Commented: (HIVE-285) UNION ALL does not allow different types in the same column
Date Wed, 11 Mar 2009 18:50:50 GMT


Ashish Thusoo commented on HIVE-285:

Just checked this on Oracle and mysql with Rama..

Oracle does not do any implict conversion and gives a type mismatch.

on the other hand

mysql does an implicit converion to varbinary which I think is equivalent to blob.

Given that we do not have blobs as data types I am perfectly fine with throwing a type mismatch
for now.

> UNION ALL does not allow different types in the same column
> -----------------------------------------------------------
>                 Key: HIVE-285
>                 URL:
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.2.0, 0.3.0
>            Reporter: Zheng Shao
>            Assignee: Raghotham Murthy
>             Fix For: 0.3.0
>         Attachments: hive-285.1.patch
> {code}
>     SELECT s.r, s.c, sum(s.v) FROM
>     (
>       SELECT a.r AS r, a.c AS c, a.v AS v FROM t1 a
>       UNION ALL
>       SELECT b.r AS r, b.c AS c, 0 + b.v AS v FROM t2 b
>     ) s
>     GROUP BY s.r, s.c;
> {code}
> Both a and b have 3 string columns: r, c, and v.
> It compiled successfully but failed during runtime.
> "Explain" shows that the plan for the 2 union-all operands have different output types
that are converged to STRING, but there is no UDFToString inserted for "0 + b.v AS v" and
as a result, SerDe was failing because it expects a String but is passed a Double.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message