[
https://issues.apache.org/jira/browse/HIVE-29749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Archit Jain updated HIVE-29749:
-------------------------------
Description:
The named struct is not able to parse the special character if used as
indetifiers.
{code:java}
Error while compiling statement: FAILED: SemanticException Error: : expected at
the position 137 of
'string:bigint:double:bigint:bigint:binary:string:bigint:bigint:bigint:bigint:binary:string:double:double:bigint:bigint:binary:struct<gpa_!@#$%^&*():double>'
but '!' is found. {code}
The logs:
{code:java}
Caused by: java.lang.IllegalArgumentException: Error: : expected at the
position 137 of
'string:bigint:double:bigint:bigint:binary:string:bigint:bigint:bigint:bigint:binary:string:double:double:bigint:bigint:binary:struct<gpa_!@#$%^&*():double>'
but '!' is found.
at
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.expect(TypeInfoUtils.java:415)
at
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.expect(TypeInfoUtils.java:385)
at
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.parseType(TypeInfoUtils.java:547)
at
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.parseTypeInfos(TypeInfoUtils.java:359)
at
org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfosFromTypeString(TypeInfoUtils.java:871)
at
org.apache.hadoop.hive.serde2.lazy.LazySerDeParameters.extractColumnInfo(LazySerDeParameters.java:163)
at
org.apache.hadoop.hive.serde2.lazy.LazySerDeParameters.<init>(LazySerDeParameters.java:92)
at
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.initialize(LazySimpleSerDe.java:116)
at
org.apache.hadoop.hive.serde2.AbstractSerDe.initialize(AbstractSerDe.java:81)
at
org.apache.hadoop.hive.serde2.SerDeUtils.initializeSerDe(SerDeUtils.java:540)
at
org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializer(TableDesc.java:102)
at
org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializer(TableDesc.java:93)
at
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFileSinkPlan(SemanticAnalyzer.java:8291)
... 88 more {code}
The error can be reproduced locally using the below q file with
TestIcebergLlapLocalCliDriver:
{code:java}
CREATE TABLE studenttab10k(
name string,
age int,
gpa double
)
ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE;
LOAD DATA LOCAL INPATH '../../data/files/studenttab10k' OVERWRITE INTO TABLE
studenttab10k;set hive.support.quoted.identifiers=column;drop table if exists
quoted_identifier_2_1;
create table quoted_identifier_2_1(`-+={[<_name_>]}?/|` string,
`!@#$%^&*()_age` int) partitioned by(`gpa_!@#$%^&*()` double) stored by iceberg;
insert into table quoted_identifier_2_1 select name,age,gpa from studenttab10k
where gpa=3.5;
drop view if exists quoted_identifier_2_2;
create view quoted_identifier_2_2 as select `!@#$%^&*()_age`,count(*) from
quoted_identifier_2_1 group by `!@#$%^&*()_age`; {code}
> Named struct does not support special characters
> ------------------------------------------------
>
> Key: HIVE-29749
> URL: https://issues.apache.org/jira/browse/HIVE-29749
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Affects Versions: 4.2.0
> Reporter: Archit Jain
> Assignee: Archit Jain
> Priority: Major
> Fix For: 4.3.0
>
>
> The named struct is not able to parse the special character if used as
> indetifiers.
> {code:java}
> Error while compiling statement: FAILED: SemanticException Error: : expected
> at the position 137 of
> 'string:bigint:double:bigint:bigint:binary:string:bigint:bigint:bigint:bigint:binary:string:double:double:bigint:bigint:binary:struct<gpa_!@#$%^&*():double>'
> but '!' is found. {code}
> The logs:
> {code:java}
> Caused by: java.lang.IllegalArgumentException: Error: : expected at the
> position 137 of
> 'string:bigint:double:bigint:bigint:binary:string:bigint:bigint:bigint:bigint:binary:string:double:double:bigint:bigint:binary:struct<gpa_!@#$%^&*():double>'
> but '!' is found.
> at
> org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.expect(TypeInfoUtils.java:415)
> at
> org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.expect(TypeInfoUtils.java:385)
> at
> org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.parseType(TypeInfoUtils.java:547)
> at
> org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils$TypeInfoParser.parseTypeInfos(TypeInfoUtils.java:359)
> at
> org.apache.hadoop.hive.serde2.typeinfo.TypeInfoUtils.getTypeInfosFromTypeString(TypeInfoUtils.java:871)
> at
> org.apache.hadoop.hive.serde2.lazy.LazySerDeParameters.extractColumnInfo(LazySerDeParameters.java:163)
> at
> org.apache.hadoop.hive.serde2.lazy.LazySerDeParameters.<init>(LazySerDeParameters.java:92)
> at
> org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe.initialize(LazySimpleSerDe.java:116)
> at
> org.apache.hadoop.hive.serde2.AbstractSerDe.initialize(AbstractSerDe.java:81)
> at
> org.apache.hadoop.hive.serde2.SerDeUtils.initializeSerDe(SerDeUtils.java:540)
> at
> org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializer(TableDesc.java:102)
> at
> org.apache.hadoop.hive.ql.plan.TableDesc.getDeserializer(TableDesc.java:93)
> at
> org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.genFileSinkPlan(SemanticAnalyzer.java:8291)
> ... 88 more {code}
> The error can be reproduced locally using the below q file with
> TestIcebergLlapLocalCliDriver:
> {code:java}
> CREATE TABLE studenttab10k(
> name string,
> age int,
> gpa double
> )
> ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' STORED AS TEXTFILE;
> LOAD DATA LOCAL INPATH '../../data/files/studenttab10k' OVERWRITE INTO TABLE
> studenttab10k;set hive.support.quoted.identifiers=column;drop table if exists
> quoted_identifier_2_1;
> create table quoted_identifier_2_1(`-+={[<_name_>]}?/|` string,
> `!@#$%^&*()_age` int) partitioned by(`gpa_!@#$%^&*()` double) stored by
> iceberg;
> insert into table quoted_identifier_2_1 select name,age,gpa from
> studenttab10k where gpa=3.5;
> drop view if exists quoted_identifier_2_2;
> create view quoted_identifier_2_2 as select `!@#$%^&*()_age`,count(*) from
> quoted_identifier_2_1 group by `!@#$%^&*()_age`; {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)