Return-Path: Delivered-To: apmail-hadoop-hive-dev-archive@locus.apache.org Received: (qmail 60222 invoked from network); 12 Nov 2008 01:12:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2008 01:12:05 -0000 Received: (qmail 22132 invoked by uid 500); 12 Nov 2008 01:12:13 -0000 Delivered-To: apmail-hadoop-hive-dev-archive@hadoop.apache.org Received: (qmail 22112 invoked by uid 500); 12 Nov 2008 01:12:13 -0000 Mailing-List: contact hive-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hive-dev@hadoop.apache.org Delivered-To: mailing list hive-dev@hadoop.apache.org Received: (qmail 22101 invoked by uid 99); 12 Nov 2008 01:12:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Nov 2008 17:12:12 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Nov 2008 01:11:01 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 731CC234C28E for ; Tue, 11 Nov 2008 17:11:44 -0800 (PST) Message-ID: <1656189229.1226452304470.JavaMail.jira@brutus> Date: Tue, 11 Nov 2008 17:11:44 -0800 (PST) From: "Zheng Shao (JIRA)" To: hive-dev@hadoop.apache.org Subject: [jira] Commented: (HIVE-15) Create table not accepting COLLECTION ITEM DELIMITER MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HIVE-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12646764#action_12646764 ] Zheng Shao commented on HIVE-15: -------------------------------- HI Edward, as of now, we support both a decimal number (ascii code of the separator), or the separator character itself (only if it's not a control character). There is a test case supporting this and it should be working now: src/contrib/hive/ql/src/test/queries/clientpositive/input_dynamicserde.q CREATE TABLE dest1(a array, b array, c map, d int, e string) ROW FORMAT DELIMITED FIELDS TERMINATED BY '1' COLLECTION ITEMS TERMINATED BY '2' MAP KEYS TERMINATED BY '3' LINES TERMINATED BY '10' STORED AS TEXTFILE; EXPLAIN FROM src_thrift INSERT OVERWRITE TABLE dest1 SELECT src_thrift.lint, src_thrift.lstring, src_thrift.mstringstring, src_thrift.aint, src_thrift.astring; FROM src_thrift INSERT OVERWRITE TABLE dest1 SELECT src_thrift.lint, src_thrift.lstring, src_thrift.mstringstring, src_thrift.aint, src_thrift.astring; SELECT dest1.* FROM dest1; SELECT dest1.a[0], dest1.b[0], dest1.c['key2'], dest1.d, dest1.e FROM dest1; Please reopen if the problem continue to exist. > Create table not accepting COLLECTION ITEM DELIMITER > ---------------------------------------------------- > > Key: HIVE-15 > URL: https://issues.apache.org/jira/browse/HIVE-15 > Project: Hadoop Hive > Issue Type: Bug > Environment: Using Hive dist from Facebook mirror, not very sure if this is the correct way to file this > Reporter: Edward Capriolo > > COLLECTION ITEMS TERMINATED BY '\t'; always causes an error regardless of what '\t' '5' '\5' etc. > > hive> create table testlist (id int,name string,favnum ARRAY) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' COLLECTION ITEMS TERMINATED BY '\t'; > java.lang.NumberFormatException: For input string: " " > at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48) > at java.lang.Integer.parseInt(Integer.java:447) > at java.lang.Byte.parseByte(Byte.java:151) > at java.lang.Byte.valueOf(Byte.java:184) > at java.lang.Byte.valueOf(Byte.java:208) > at org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.initialize(TCTLSeparatedProtocol.java:316) > at org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe.initialize(DynamicSerDe.java:85) > at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:178) > at org.apache.hadoop.hive.ql.metadata.Table.initSerDe(Table.java:135) > at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:198) > at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:205) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:174) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:183) > at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:208) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:304) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.apache.hadoop.util.RunJar.main(RunJar.java:155) > at org.apache.hadoop.mapred.JobShell.run(JobShell.java:194) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79) > at org.apache.hadoop.mapred.JobShell.main(JobShell.java:220) > FAILED: Error in metadata: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException java.lang.NumberFormatException: For input string: " ") > FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask > Time taken: 2.823 seconds -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.