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 32E538C54 for ; Tue, 13 Sep 2011 21:12:20 +0000 (UTC) Received: (qmail 86934 invoked by uid 500); 13 Sep 2011 21:12:19 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 86460 invoked by uid 500); 13 Sep 2011 21:12: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 86384 invoked by uid 500); 13 Sep 2011 21:12:18 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 86364 invoked by uid 99); 13 Sep 2011 21:12:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Sep 2011 21:12:17 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Sep 2011 21:12:16 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0959496F23 for ; Tue, 13 Sep 2011 21:11:13 +0000 (UTC) Date: Tue, 13 Sep 2011 21:11:13 +0000 (UTC) From: "Carl Steinbach (JIRA)" To: hive-dev@hadoop.apache.org Message-ID: <296947881.24078.1315948273035.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <25427842.113231292332740899.JavaMail.jira@thor> Subject: [jira] [Updated] (HIVE-1850) alter table set serdeproperties bypasses regexps checks (leaves table in a non-recoverable state?) 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-1850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carl Steinbach updated HIVE-1850: --------------------------------- Fix Version/s: (was: 0.8.0) > alter table set serdeproperties bypasses regexps checks (leaves table in a non-recoverable state?) > -------------------------------------------------------------------------------------------------- > > Key: HIVE-1850 > URL: https://issues.apache.org/jira/browse/HIVE-1850 > Project: Hive > Issue Type: Bug > Components: Serializers/Deserializers > Affects Versions: 0.7.0 > Environment: Trunk build from a few days ago, but seen once before with older version as well. > Reporter: Terje Marthinussen > Assignee: Amareshwari Sriramadasu > Attachments: patch-1850-2.txt, patch-1850.txt > > > {code} > create table aa ( test STRING ) > ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe' > WITH SERDEPROPERTIES ("input.regex" = "[^\\](.*)", "output.format.string" = "$1s"); > {code} > This will fail. Great! > {code} > create table aa ( test STRING ) > ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe' > WITH SERDEPROPERTIES ("input.regex" = "(.*)", "output.format.string" = "$1s"); > {code} > Works, no problem there. > {code} > alter table aa set serdeproperties ("input.regex" = "[^\\](.*)", "output.format.string" = "$1s"); > {code} > Wups... I can set that without any problems! > {code} > alter table aa set serdeproperties ("input.regex" = "(.*)", "output.format.string" = "$1s"); > FAILED: Hive Internal Error: java.util.regex.PatternSyntaxException(Unclosed character class near index 7 > [^\](.*) > ^) > java.util.regex.PatternSyntaxException: Unclosed character class near index 7 > [^\](.*) > ^ > at java.util.regex.Pattern.error(Pattern.java:1713) > at java.util.regex.Pattern.clazz(Pattern.java:2254) > at java.util.regex.Pattern.sequence(Pattern.java:1818) > at java.util.regex.Pattern.expr(Pattern.java:1752) > at java.util.regex.Pattern.compile(Pattern.java:1460) > at java.util.regex.Pattern.(Pattern.java:1133) > at java.util.regex.Pattern.compile(Pattern.java:847) > at org.apache.hadoop.hive.contrib.serde2.RegexSerDe.initialize(RegexSerDe.java:101) > at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:199) > at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:253) > at org.apache.hadoop.hive.ql.metadata.Table.getCols(Table.java:484) > at org.apache.hadoop.hive.ql.metadata.Table.checkValidity(Table.java:161) > at org.apache.hadoop.hive.ql.metadata.Hive.getTable(Hive.java:803) > at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeAlterTableSerdeProps(DDLSemanticAnalyzer.java:558) > at org.apache.hadoop.hive.ql.parse.DDLSemanticAnalyzer.analyzeInternal(DDLSemanticAnalyzer.java:232) > at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238) > at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:335) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:686) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:142) > at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:216) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:370) > 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:156) > {code} > After this, all further commands on the table fails, including drop table :) > 1. The alter table command should probably check the regexp just like the create table command does > 2. Even though the regexp is bad, it should be possible to do things like set the regexp again or drop the table. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira