hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carter Shanklin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-15297) Hive should not split semicolon within quoted string literals
Date Sat, 07 Jan 2017 02:30:58 GMT

    [ https://issues.apache.org/jira/browse/HIVE-15297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15806544#comment-15806544
] 

Carter Shanklin commented on HIVE-15297:
----------------------------------------

[~pxiong] same problem

{code}
hive> create table test (`x,y` int);
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException:
MetaException(message:org.apache.hadoop.hive.serde2.SerDeException org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe:
columns has 2 elements while columns.types has 1 elements!)

hive> create table ts (test string);
OK
Time taken: 2.262 seconds
hive> INSERT INTO ts VALUES ('Mozilla/5.0 (iPhone; CPU iPhone OS 5_0');
Query ID = vagrant_20170107022957_4be25fcf-33c6-4f8a-b77d-3da64d061ab6
Total jobs = 1
Launching Job 1 out of 1


Status: Running (Executing on YARN cluster with App id application_1483730450215_0007)

----------------------------------------------------------------------------------------------
        VERTICES      MODE        STATUS  TOTAL  COMPLETED  RUNNING  PENDING  FAILED  KILLED
----------------------------------------------------------------------------------------------
Map 1 .......... container     SUCCEEDED      1          1        0        0       0     
 0
----------------------------------------------------------------------------------------------
VERTICES: 01/01  [==========================>>] 100%  ELAPSED TIME: 0.71 s
----------------------------------------------------------------------------------------------
Loading data to table default.ts
OK
Time taken: 4.146 seconds
hive>
{code}

> Hive should not split semicolon within quoted string literals
> -------------------------------------------------------------
>
>                 Key: HIVE-15297
>                 URL: https://issues.apache.org/jira/browse/HIVE-15297
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Pengcheng Xiong
>            Assignee: Pengcheng Xiong
>         Attachments: HIVE-15297.01.patch, HIVE-15297.02.patch, HIVE-15297.03.patch, HIVE-15297.04.patch,
HIVE-15297.05.patch
>
>
> String literals in query cannot have reserved symbols. The same set of query works fine
in mysql and postgresql. 
> {code}
> hive> CREATE TABLE ts(s varchar(550));
> OK
> Time taken: 0.075 seconds
> hive> INSERT INTO ts VALUES ('Mozilla/5.0 (iPhone; CPU iPhone OS 5_0');
> MismatchedTokenException(14!=326)
> 	at org.antlr.runtime.BaseRecognizer.recoverFromMismatchedToken(BaseRecognizer.java:617)
> 	at org.antlr.runtime.BaseRecognizer.match(BaseRecognizer.java:115)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.valueRowConstructor(HiveParser_FromClauseParser.java:7271)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.valuesTableConstructor(HiveParser_FromClauseParser.java:7370)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser_FromClauseParser.valuesClause(HiveParser_FromClauseParser.java:7510)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.valuesClause(HiveParser.java:51854)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.regularBody(HiveParser.java:45432)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpressionBody(HiveParser.java:44578)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.queryStatementExpression(HiveParser.java:44448)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.execStatement(HiveParser.java:1694)
> 	at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1176)
> 	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:204)
> 	at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:402)
> 	at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:326)
> 	at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1169)
> 	at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1288)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1095)
> 	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1083)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:232)
> 	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:183)
> 	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:399)
> 	at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:776)
> 	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:714)
> 	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> FAILED: ParseException line 1:31 mismatched input '/' expecting ) near 'Mozilla' in value
row constructor
> hive>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message