-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-29695: ClassCastException in MapJoin when Parquet String is mapped to Date #6578
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| CREATE TABLE repro_parquet_string ( | ||
| id INT, | ||
| col1 STRING | ||
| ) STORED AS PARQUET; | ||
|
|
||
| INSERT INTO repro_parquet_string VALUES (1, '2026-01-01'); | ||
|
|
||
| CREATE EXTERNAL TABLE repro_parquet_date ( | ||
| id INT, | ||
| col1 DATE | ||
| ) STORED AS PARQUET | ||
| LOCATION '${hiveconf:hive.metastore.warehouse.dir}/repro_parquet_string'; | ||
|
|
||
| CREATE TABLE small_table ( | ||
| id INT, | ||
| date_col DATE | ||
| ); | ||
| INSERT INTO small_table VALUES (1, '2026-01-01'); | ||
|
|
||
| SET hive.auto.convert.join=true; | ||
| SET hive.vectorized.execution.enabled=false; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is that only reproduced in non-vectorized flow ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, when enabled the above exception in comments is thrown.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what about other types like timestamp?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it will not work for now.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
probably because it only reproduces in non-vectorized flow. Wonder if we can extract common converters and not duplicate code?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I’ll see how to optimize the approach for other types. I’ll get back to you in 2 days. |
||
|
|
||
| SELECT /*+ MAPJOIN(small_table) */ a.col1 | ||
| FROM repro_parquet_date a | ||
| JOIN small_table b ON a.id = b.id; | ||
|
|
||
| SET hive.vectorized.execution.enabled=true; | ||
|
|
||
| EXPLAIN VECTORIZATION DETAIL | ||
| SELECT /*+ MAPJOIN(small_table) */ a.col1 | ||
| FROM repro_parquet_date a | ||
| JOIN small_table b ON a.id = b.id; | ||
|
|
||
| SELECT /*+ MAPJOIN(small_table) */ a.col1 | ||
| FROM repro_parquet_date a | ||
| JOIN small_table b ON a.id = b.id; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need custom location?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can use
ALTERalso instead of creating a new table on top of previously created table repro_parquet_string. The goal was to pass String to DATE col