-
Notifications
You must be signed in to change notification settings - Fork 4.8k
HIVE-24167: TPC-DS query 14 fails while generating plan for the filter #5077
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
b23ec31
50dc3f3
17cea96
3cfb6e1
c473fe9
b11e3f8
bd22d94
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 |
|---|---|---|
|
|
@@ -277,8 +277,8 @@ private ASTNode convert() throws CalciteSemanticException { | |
| if (where != null) { | ||
| ASTNode cond = where.getCondition().accept(new RexVisitor(schema, false, root.getCluster().getRexBuilder())); | ||
| hiveAST.where = ASTBuilder.where(cond); | ||
| planMapper.link(cond, where); | ||
| planMapper.link(cond, RelTreeSignature.of(where)); | ||
| planMapper.link(cond, where); | ||
|
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. We link RelTreeSignature first so that we can safely unify multiple filters.
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. cool! :D |
||
| } | ||
|
|
||
| /* | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| --! qt:dataset:src | ||
|
|
||
| set hive.optimize.cte.materialize.threshold=1; | ||
| set hive.optimize.cte.materialize.full.aggregate.only=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. By setting this property the test fails with the same
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'm checking the whole execution and what the flag does. Disabling I'm putting my additional notes here. I tried to put some to-be solutions but it could not be very easy.
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 guess
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 found this fails if we disable @zabetak As a potential workaround, I'm wondering if it makes sense to relax the validation and disable features with which PlanMapper is involved when "equivalence mapping violation" happens. |
||
|
|
||
| EXPLAIN CBO | ||
| WITH materialized_cte AS ( | ||
| SELECT key, value FROM src WHERE key != '100' | ||
| ), | ||
| another_materialized_cte AS ( | ||
| SELECT key, value FROM src WHERE key != '100' | ||
| ) | ||
| SELECT a.key, a.value, b.key, b.value | ||
| FROM materialized_cte a | ||
| JOIN another_materialized_cte b ON a.key = b.key | ||
| ORDER BY a.key; | ||
|
|
||
| EXPLAIN | ||
| WITH materialized_cte AS ( | ||
| SELECT key, value FROM src WHERE key != '100' | ||
| ), | ||
| another_materialized_cte AS ( | ||
| SELECT key, value FROM src WHERE key != '100' | ||
| ) | ||
| SELECT a.key, a.value, b.key, b.value | ||
| FROM materialized_cte a | ||
| JOIN another_materialized_cte b ON a.key = b.key | ||
| ORDER BY a.key; | ||
Uh oh!
There was an error while loading. Please reload this page.