-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29749: TypeInfoUtils fails to parse struct type strings with special characters in field names #6619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
deniskuzZ
merged 1 commit into
apache:master
from
architjainjain:HIVE-29749-parse-special-chars
Jul 22, 2026
Merged
HIVE-29749: TypeInfoUtils fails to parse struct type strings with special characters in field names #6619
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
iceberg/iceberg-handler/src/test/queries/positive/iceberg_partition_special_chars.q
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| 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`; | ||
|
|
||
| -- Two partition columns: one plain (age), one with special characters (gpa_!@#$%^&*()) | ||
| drop table if exists quoted_identifier_2_3; | ||
|
|
||
| create table quoted_identifier_2_3(`name_col` string) partitioned by(age int, `gpa_!@#$%^&*()` double) stored by iceberg; | ||
|
|
||
| insert into table quoted_identifier_2_3 select name,age,gpa from studenttab10k where gpa=4.5; | ||
|
|
||
| select count(*) from quoted_identifier_2_3; |
97 changes: 97 additions & 0 deletions
97
iceberg/iceberg-handler/src/test/results/positive/iceberg_partition_special_chars.q.out
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| PREHOOK: query: CREATE TABLE studenttab10k( | ||
| name string, | ||
| age int, | ||
| gpa double | ||
| ) | ||
| ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' | ||
| STORED AS TEXTFILE | ||
| PREHOOK: type: CREATETABLE | ||
| PREHOOK: Output: database:default | ||
| PREHOOK: Output: default@studenttab10k | ||
| POSTHOOK: query: CREATE TABLE studenttab10k( | ||
| name string, | ||
| age int, | ||
| gpa double | ||
| ) | ||
| ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' | ||
| STORED AS TEXTFILE | ||
| POSTHOOK: type: CREATETABLE | ||
| POSTHOOK: Output: database:default | ||
| POSTHOOK: Output: default@studenttab10k | ||
| PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/studenttab10k' OVERWRITE INTO TABLE studenttab10k | ||
| PREHOOK: type: LOAD | ||
| #### A masked pattern was here #### | ||
| PREHOOK: Output: default@studenttab10k | ||
| POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/studenttab10k' OVERWRITE INTO TABLE studenttab10k | ||
| POSTHOOK: type: LOAD | ||
| #### A masked pattern was here #### | ||
| POSTHOOK: Output: default@studenttab10k | ||
| PREHOOK: query: drop table if exists quoted_identifier_2_1 | ||
| PREHOOK: type: DROPTABLE | ||
| PREHOOK: Output: database:default | ||
| POSTHOOK: query: drop table if exists quoted_identifier_2_1 | ||
| POSTHOOK: type: DROPTABLE | ||
| POSTHOOK: Output: database:default | ||
| PREHOOK: query: create table quoted_identifier_2_1(`-+={[<_name_>]}?/|` string, `!@#$%^&*()_age` int) partitioned by(`gpa_!@#$%^&*()` double) stored by iceberg | ||
| PREHOOK: type: CREATETABLE | ||
| PREHOOK: Output: database:default | ||
| PREHOOK: Output: default@quoted_identifier_2_1 | ||
| POSTHOOK: query: create table quoted_identifier_2_1(`-+={[<_name_>]}?/|` string, `!@#$%^&*()_age` int) partitioned by(`gpa_!@#$%^&*()` double) stored by iceberg | ||
| POSTHOOK: type: CREATETABLE | ||
| POSTHOOK: Output: database:default | ||
| POSTHOOK: Output: default@quoted_identifier_2_1 | ||
| PREHOOK: query: insert into table quoted_identifier_2_1 select name,age,gpa from studenttab10k where gpa=3.5 | ||
| PREHOOK: type: QUERY | ||
| PREHOOK: Input: default@studenttab10k | ||
| PREHOOK: Output: default@quoted_identifier_2_1 | ||
| POSTHOOK: query: insert into table quoted_identifier_2_1 select name,age,gpa from studenttab10k where gpa=3.5 | ||
| POSTHOOK: type: QUERY | ||
| POSTHOOK: Input: default@studenttab10k | ||
| POSTHOOK: Output: default@quoted_identifier_2_1 | ||
| PREHOOK: query: drop view if exists quoted_identifier_2_2 | ||
| PREHOOK: type: DROPVIEW | ||
| POSTHOOK: query: drop view if exists quoted_identifier_2_2 | ||
| POSTHOOK: type: DROPVIEW | ||
| PREHOOK: query: create view quoted_identifier_2_2 as select `!@#$%^&*()_age`,count(*) from quoted_identifier_2_1 group by `!@#$%^&*()_age` | ||
| PREHOOK: type: CREATEVIEW | ||
| PREHOOK: Input: default@quoted_identifier_2_1 | ||
| PREHOOK: Output: database:default | ||
| PREHOOK: Output: default@quoted_identifier_2_2 | ||
| POSTHOOK: query: create view quoted_identifier_2_2 as select `!@#$%^&*()_age`,count(*) from quoted_identifier_2_1 group by `!@#$%^&*()_age` | ||
| POSTHOOK: type: CREATEVIEW | ||
| POSTHOOK: Input: default@quoted_identifier_2_1 | ||
| POSTHOOK: Output: database:default | ||
| POSTHOOK: Output: default@quoted_identifier_2_2 | ||
| POSTHOOK: Lineage: quoted_identifier_2_2.!@#$%^&*()_age SIMPLE [(quoted_identifier_2_1)quoted_identifier_2_1.FieldSchema(name:!@#$%^&*()_age, type:int, comment:null), ] | ||
| POSTHOOK: Lineage: quoted_identifier_2_2._c1 EXPRESSION [(quoted_identifier_2_1)quoted_identifier_2_1.null, ] | ||
| PREHOOK: query: drop table if exists quoted_identifier_2_3 | ||
| PREHOOK: type: DROPTABLE | ||
| PREHOOK: Output: database:default | ||
| POSTHOOK: query: drop table if exists quoted_identifier_2_3 | ||
| POSTHOOK: type: DROPTABLE | ||
| POSTHOOK: Output: database:default | ||
| PREHOOK: query: create table quoted_identifier_2_3(`name_col` string) partitioned by(age int, `gpa_!@#$%^&*()` double) stored by iceberg | ||
| PREHOOK: type: CREATETABLE | ||
| PREHOOK: Output: database:default | ||
| PREHOOK: Output: default@quoted_identifier_2_3 | ||
| POSTHOOK: query: create table quoted_identifier_2_3(`name_col` string) partitioned by(age int, `gpa_!@#$%^&*()` double) stored by iceberg | ||
| POSTHOOK: type: CREATETABLE | ||
| POSTHOOK: Output: database:default | ||
| POSTHOOK: Output: default@quoted_identifier_2_3 | ||
| PREHOOK: query: insert into table quoted_identifier_2_3 select name,age,gpa from studenttab10k where gpa=4.5 | ||
| PREHOOK: type: QUERY | ||
| PREHOOK: Input: default@studenttab10k | ||
| PREHOOK: Output: default@quoted_identifier_2_3 | ||
| POSTHOOK: query: insert into table quoted_identifier_2_3 select name,age,gpa from studenttab10k where gpa=4.5 | ||
| POSTHOOK: type: QUERY | ||
| POSTHOOK: Input: default@studenttab10k | ||
| POSTHOOK: Output: default@quoted_identifier_2_3 | ||
| PREHOOK: query: select count(*) from quoted_identifier_2_3 | ||
| PREHOOK: type: QUERY | ||
| PREHOOK: Input: default@quoted_identifier_2_3 | ||
| PREHOOK: Output: hdfs://### HDFS PATH ### | ||
| POSTHOOK: query: select count(*) from quoted_identifier_2_3 | ||
| POSTHOOK: type: QUERY | ||
| POSTHOOK: Input: default@quoted_identifier_2_3 | ||
| POSTHOOK: Output: hdfs://### HDFS PATH ### | ||
| 0 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.