hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raghotham Murthy (JIRA)" <>
Subject [jira] Resolved: (HIVE-297) Parses doesn't catch certain type errors.
Date Tue, 10 Mar 2009 22:57:50 GMT


Raghotham Murthy resolved HIVE-297.

    Resolution: Duplicate
      Assignee: Raghotham Murthy

Duplicate of HIVE-297

> Parses doesn't catch certain type errors.
> -----------------------------------------
>                 Key: HIVE-297
>                 URL:
>             Project: Hadoop Hive
>          Issue Type: Bug
>          Components: Query Processor
>            Reporter: S. Alex Smith
>            Assignee: Raghotham Murthy
> The following query:
> FROM (
>     FROM (FROM my_table
>          SELECT CAST(userid AS BIGINT) AS userid a
>    SELECT userid
>    FROM (FROM my_table
>          SELECT CAST(userid AS STRING) AS userid) b
>    SELECT userid
>    ) unioned
>    SELECT DISTINCT userid;
> Is accepted by the parse, but throws the following at run-time:
> java.lang.RuntimeException: org.apache.hadoop.hive.serde2.SerDeException: java.lang.ClassCastException:
java.lang.Long cannot be cast to java.lang.String
> (Note that this seems less silly if the inner queries are different tables with userid
stored as a bigint and a string, respectively)
> I have interpreted this as a bug in the parser, but it could also be viewed as a bug
about not auto-casting.
> This can be worked around by using explicit CAST statements.

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

View raw message