-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-21778 CBO: "Struct is not null" gets evaluated as nullable always causing filter miss in the query
#928
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
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 |
|---|---|---|
|
|
@@ -21,3 +21,19 @@ IN ( | |
| struct('1234-1111-0074578664','3'), | ||
| struct('1234-1111-0074578695',1) | ||
| ); | ||
|
|
||
| CREATE TABLE test_struct | ||
| ( | ||
| f1 string, | ||
| demo_struct struct<f1:string, f2:string, f3:string>, | ||
| datestr string | ||
| ); | ||
|
|
||
|
Contributor
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. Can we insert a few rows here and add the SELECT query? Just in case that
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 am unable to add a |
||
| insert into test_struct values('s1', named_struct('f1','1', 'f2','2', 'f3','3'), '02-02-2020'); | ||
| insert into test_struct values('s2', named_struct('f1',cast(null as string),'f2', cast(null as string),'f3', cast(null as string)), '02-02-2020'); | ||
| insert into test_struct values('s4', named_struct('f1','100', 'f2','200', 'f3','300'), '02-02-2020'); | ||
|
|
||
| explain select * from test_struct where datestr='02-02-2020' and demo_struct is not null; | ||
| select * from test_struct where datestr='02-02-2020' and demo_struct is not null; | ||
|
|
||
| DROP TABLE test_struct; | ||
Uh oh!
There was an error while loading. Please reload this page.