-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[improvement](mtmv) Support grouping_sets rewrite when query rewrite by materialized view #35976
Conversation
…he#35723) `If the value of rhs is negative or is not less than the number of bits in lhs, the behavior is undefined.`
…by materialized view
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
TPC-H: Total hot run time: 39936 ms
|
TPC-DS: Total hot run time: 168980 ms
|
ClickBench: Total hot run time: 30.17 s
|
return true; | ||
} | ||
// if both query and view has group sets, or query doesn't hava, mv have, not supported | ||
if ((queryHasGroupSets && viewHasGroupSets) || (!queryHasGroupSets && viewHasGroupSets)) { |
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.
if ((queryHasGroupSets && viewHasGroupSets) || (!queryHasGroupSets && viewHasGroupSets)) { | |
if (viewHasGroupSets) { |
if (!queryHasGroupSets && !viewHasGroupSets) { | ||
return true; | ||
} |
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.
remove this if
Proposed changes
this is replaced by #36056
this depends on #35897
Support grouping_sets, cube, rollup query rewrite by materialized view, if mv group by fields contains all the group by fields in query.
For example as following:
mv def
the query following can rewrite successfully by mv above
if query group by fields is sub of mv group by fields, and the query aggregate function extends
RollupTrait
it can also rewrites successfully, for example query as following.
this is applicable for
CUBE
,ROLLUP