[ https://issues.apache.org/jira/browse/HIVE-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ashutosh Chauhan updated HIVE-2615: ----------------------------------- Fix Version/s: (was: 0.12.0) Affects Version/s: 0.7.0 0.8.0 0.9.0 0.10.0 0.11.0 Status: Open (was: Patch Available) Instead of in SemanticAnalyzer, better place to do this check is in TypeCheckProcFactory.java > 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.11.0, 0.10.0, 0.9.0, 0.8.0, 0.7.0, 0.6.0 > Reporter: David Phillips > Assignee: Zhuoluo (Clark) Yang > 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 is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira