hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manoj Narayanan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-18398) WITH SERDEPROPERTIES option is broken without org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Date Sun, 22 Apr 2018 21:41:00 GMT

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

Manoj Narayanan commented on HIVE-18398:
----------------------------------------

Looks like this behavior is different in Hive 2.X version due to fix done in https://issues.apache.org/jira/browse/HIVE-12506. That
Jira says that fix was committed to branch 2.1, 2.0.0 and 1.3. I am not sure if 1.3 ever
went out.

Anyhow As per [https://cwiki.apache.org/confluence/display/Hive/HowToContribute#HowToContribute-UnderstandingHiveBranches]  
and [https://cwiki.apache.org/confluence/display/Hive/Home#Home-HiveVersionsandBranches] what
I understand is that branch-1 acts as source of all 1.X releases now. branch-1 or branch-1.X
doesn't contain that commit.

 

So I think commit for above Jira

[https://github.com/apache/hive/commit/ed9736080aa960ad7d7c2af58d692e6b4f9d6df5]

would need to be back ported to latest hive 1.X branch (branch-1)

> WITH SERDEPROPERTIES option is broken without org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
> ------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-18398
>                 URL: https://issues.apache.org/jira/browse/HIVE-18398
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 1.2.1
>            Reporter: Rajkumar Singh
>            Priority: Minor
>
> *Steps to reproduce:*
> 1. Create table 
> {code}
> create table test_serde(id int,value string) ROW FORMAT DELIMITED FIELDS TERMINATED BY
'|' ESCAPED BY '\\' 
> {code}
> 2. show create table produce following output
> {code}
> CREATE TABLE `test_serde`(
>   `id` int, 
>   `value` string)
> ROW FORMAT DELIMITED 
>   FIELDS TERMINATED BY '|' 
> WITH SERDEPROPERTIES ( 
>   'escape.delim'='\\') 
> STORED AS INPUTFORMAT 
>   'org.apache.hadoop.mapred.TextInputFormat' 
> OUTPUTFORMAT 
>   'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
> LOCATION
>   'hdfs://hdp262a.hdp.local:8020/apps/hive/warehouse/test_serde'
> TBLPROPERTIES (
>   'COLUMN_STATS_ACCURATE'='{\"BASIC_STATS\":\"true\"}', 
>   'numFiles'='0', 
>   'numRows'='0', 
>   'rawDataSize'='0', 
>   'totalSize'='0', 
>   'transient_lastDdlTime'='1515448894')
> {code}
> 3. once you run the  create table using the output of show create it ran into the parsing
error
> {code}
> NoViableAltException(296@[1876:103: ( tableRowFormatMapKeysIdentifier )?])
> 	at org.antlr.runtime.DFA.noViableAlt(DFA.java:158)
> 	at org.antlr.runtime.DFA.predict(DFA.java:116)
> 	.....
> FAILED: ParseException line 6:0 cannot recognize input near 'WITH' 'SERDEPROPERTIES'
'(' in serde properties specification
> {code}
> 4. table create with LazySimpleSerde don't have any such issue.
> {code}
> hive> CREATE TABLE `foo`( 
>     > `col` string) 
>     > ROW FORMAT SERDE 
>     > 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' 
>     > WITH SERDEPROPERTIES ( 
>     > 'serialization.encoding'='UTF-8') 
>     > STORED AS INPUTFORMAT 
>     > 'org.apache.hadoop.mapred.TextInputFormat' 
>     > OUTPUTFORMAT 
>     > 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' ;
> OK
> Time taken: 0.375 seconds
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message