You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Harsh J (JIRA)" <ji...@apache.org> on 2014/03/23 03:26:42 UTC

[jira] [Resolved] (HIVE-2615) CTAS with literal NULL creates VOID type

     [ https://issues.apache.org/jira/browse/HIVE-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harsh J resolved HIVE-2615.
---------------------------

       Resolution: Duplicate
    Fix Version/s: 0.12.0

This has been fixed via HIVE-4172. Resolving as duplicate.

> CTAS with literal NULL creates VOID type
> ----------------------------------------
>
>                 Key: HIVE-2615
>                 URL: https://issues.apache.org/jira/browse/HIVE-2615
>             Project: Hive
>          Issue Type: Bug
>          Components: Query Processor
>    Affects Versions: 0.6.0, 0.7.0, 0.8.0, 0.9.0, 0.10.0, 0.11.0
>            Reporter: David Phillips
>            Assignee: Zhuoluo (Clark) Yang
>             Fix For: 0.12.0
>
>         Attachments: HIVE-2615.1.patch
>
>
> Create the table with a column that always contains NULL:
> {quote}
> hive> create table bad as select 1 x, null z from dual;     
> {quote}
> Because there's no type, Hive gives it the VOID type:
> {quote}
> hive> describe bad;
> OK
> x	int	
> z	void	
> {quote}
> This seems weird, because AFAIK, there is no normal way to create a column of type VOID.  The problem is that the table can't be queried:
> {quote}
> hive> select * from bad;
> OK
> Failed with exception java.io.IOException:java.lang.RuntimeException: Internal error: no LazyObject for VOID
> {quote}
> Worse, even if you don't select that field, the query fails at runtime:
> {quote}
> hive> select x from bad;
> ...
> FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.MapRedTask
> {quote}



--
This message was sent by Atlassian JIRA
(v6.2#6252)