Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id ED1DBC758 for ; Tue, 29 Jan 2013 02:35:18 +0000 (UTC) Received: (qmail 50838 invoked by uid 500); 29 Jan 2013 02:35:18 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 50780 invoked by uid 500); 29 Jan 2013 02:35:18 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 50756 invoked by uid 500); 29 Jan 2013 02:35:17 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 50702 invoked by uid 99); 29 Jan 2013 02:35:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 29 Jan 2013 02:35:17 +0000 Date: Tue, 29 Jan 2013 02:35:17 +0000 (UTC) From: "Zhuoluo (Clark) Yang (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-2615) CTAS with literal NULL creates VOID type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-2615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13565006#comment-13565006 ] Zhuoluo (Clark) Yang commented on HIVE-2615: -------------------------------------------- I think option 3 is the better choice, from [~david.phillips] says. Is any body working on this issue? > CTAS with literal NULL creates VOID type > ---------------------------------------- > > Key: HIVE-2615 > URL: https://issues.apache.org/jira/browse/HIVE-2615 > Project: Hive > Issue Type: Bug > Reporter: David Phillips > > 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