Skip to content

Hive: Support MAP<K, V> column types#2346

Open
wugeer wants to merge 1 commit into
apache:mainfrom
wugeer:feat/add_support_map_column_type
Open

Hive: Support MAP<K, V> column types#2346
wugeer wants to merge 1 commit into
apache:mainfrom
wugeer:feat/add_support_map_column_type

Conversation

@wugeer
Copy link
Copy Markdown
Contributor

@wugeer wugeer commented May 21, 2026

close: #2345

Comment thread tests/sqlparser_hive.rs

#[test]
fn parse_create_table_with_map_column_comment() {
let sql = "create table tmp.xxx (kv_map map<string, string> comment 'kv col comment');";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have the test only do a round trip test via verified_stmt?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

图片

In hive, the map<string, string> and map(string, string) are not exactly the same, is there a need to change the notation from ( to <, for hive separately?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we necessarily need to, the impl is ok if we're happy with the current roundtrip behavior, my comment was primarily around the test setup, if verified_stmt does not apply to the syntax then an alternative will be one_statement_parse_to where we pass the input sql and expected canonical sql to assert

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've rethought it, converting map<string, string> to map(string, string) in the hive dialect will cause the parsed sql to fail compilation, which is a functionality breaker, it's better to keep the logic of the sql before and after consistent. (

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hive dialect does not support MAP<K, V> column types

2 participants