You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Rajkumar Singh (JIRA)" <ji...@apache.org> on 2018/01/08 23:24:00 UTC
[jira] [Created] (HIVE-18398) WITH SERDEPROPERTIES option is broken
without org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
Rajkumar Singh created HIVE-18398:
-------------------------------------
Summary: 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
(v6.4.14#64029)