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 0425EE3B1 for ; Mon, 18 Feb 2013 02:51:14 +0000 (UTC) Received: (qmail 34713 invoked by uid 500); 18 Feb 2013 02:51:13 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 34670 invoked by uid 500); 18 Feb 2013 02:51:13 -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 34650 invoked by uid 500); 18 Feb 2013 02:51:12 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 34642 invoked by uid 99); 18 Feb 2013 02:51:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Feb 2013 02:51:12 +0000 Date: Mon, 18 Feb 2013 02:51:12 +0000 (UTC) From: "caofangkun (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-4032) Inserting data into Hive table from a query, when the query is a partitioned table and select * ,will generate a SemanticException 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-4032?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] caofangkun updated HIVE-4032: ----------------------------- Description: Inserting data into Hive table from a query , when the query is : select * from a_partitioned_table, will throw a SemanticException . It seems that "*" contains the virtual partition columns. drop table if exists zr_test; create table if not exists zr_test (key string, value string) partitioned by (dt string); drop table if exists zr_test_1; create table if not exists zr_test_1 (key string, value string) partitioned by (dt string); --Query One explain insert into table zr_test partition (dt='20130217') select key, value from zr_test_1 where dt='20130217'; --Query Two explain insert into table zr_test partition (dt='20130217') select * from zr_test_1 where dt='20130217'; Ouery One works well, bug Query Two failed with the following information: FAILED: SemanticException [Error 10044]: Line 2:18 Cannot insert into target table because column number/types are different ''20130217'': Table insclause-0 has 2 columns, but query has 3 columns. p.s: Query Two works well on Apache Hadoop 0.20.1 + Hive 0.10.0 was: Inserting data into Hive table from a query , when the query is : select * from a_partitioned_table, will throw a SemanticException . It seems that "*" contains the virtual partition columns. drop table if exists zr_test; create table if not exists zr_test (key string, value string) partitioned by (dt string); drop table if exists zr_test_1; create table if not exists zr_test_1 (key string, value string) partitioned by (dt string); --Query One explain insert into table zr_test partition (dt='20130217') select key, value from zr_test_1 where dt='20130217'; --Query Two explain insert into table zr_test partition (dt='20130217') select * from zr_test_1 where dt='20130217'; Ouery One works well, bug Query Two failed with the following information: FAILED: SemanticException [Error 10044]: Line 2:18 Cannot insert into target table because column number/types are different ''20130217'': Table insclause-0 has 2 columns, but query has 3 columns. Environment: Apache Hadoop 0.19.1 + Apache Hive 0.10.0 > Inserting data into Hive table from a query, when the query is a partitioned table and select * ,will generate a SemanticException > ---------------------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-4032 > URL: https://issues.apache.org/jira/browse/HIVE-4032 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.10.0 > Environment: Apache Hadoop 0.19.1 + Apache Hive 0.10.0 > Reporter: caofangkun > Priority: Minor > > Inserting data into Hive table from a query , when the query is : select * from a_partitioned_table, will throw a SemanticException . > It seems that "*" contains the virtual partition columns. > drop table if exists zr_test; > create table if not exists zr_test (key string, value string) partitioned by (dt string); > drop table if exists zr_test_1; > create table if not exists zr_test_1 (key string, value string) partitioned by (dt string); > --Query One > explain > insert into table zr_test partition (dt='20130217') select key, value from zr_test_1 where dt='20130217'; > --Query Two > explain > insert into table zr_test partition (dt='20130217') select * from zr_test_1 where dt='20130217'; > Ouery One works well, bug Query Two failed with the following information: > FAILED: SemanticException [Error 10044]: Line 2:18 Cannot insert into target table because column number/types are different ''20130217'': Table insclause-0 has 2 columns, but query has 3 columns. > p.s: > Query Two works well on Apache Hadoop 0.20.1 + Hive 0.10.0 -- 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