-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[feature](mtmv) Support variants rewrite by materialized view #37929
[feature](mtmv) Support variants rewrite by materialized view #37929
Conversation
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: 39642 ms
|
TPC-DS: Total hot run time: 175235 ms
|
ClickBench: Total hot run time: 30.51 s
|
2815a06
to
e7dc397
Compare
if (targetSlot == null) { | ||
continue; | ||
} |
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.
add comment to explain why not print warn log when data type is variant
} | ||
if (minExpr != null) { | ||
targetToTargetReplacementMappingQueryBased.put(queryNameEntry.getValue(), | ||
constructElementAt(minExpr, minCompensateName)); |
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.
after rewrite, these new element_at will be push into scan node too?
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.
yeah, this will push into scan node again by RBO
run buildall |
TPC-H: Total hot run time: 40078 ms
|
TPC-DS: Total hot run time: 173633 ms
|
ClickBench: Total hot run time: 30.88 s
|
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
294e32b
to
31b9b5a
Compare
run buildall |
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.
LGTM
TPC-H: Total hot run time: 40118 ms
|
TPC-DS: Total hot run time: 176035 ms
|
ClickBench: Total hot run time: 31.13 s
|
91983a7
to
2398c5f
Compare
run buildall |
TPC-H: Total hot run time: 40190 ms
|
TPC-DS: Total hot run time: 174022 ms
|
ClickBench: Total hot run time: 30.4 s
|
run buildall |
TPC-H: Total hot run time: 39745 ms
|
TPC-DS: Total hot run time: 174339 ms
|
ClickBench: Total hot run time: 30.58 s
|
run buildall |
TPC-H: Total hot run time: 40281 ms
|
TPC-DS: Total hot run time: 173736 ms
|
ClickBench: Total hot run time: 30.9 s
|
Support variants rewrite by materialized view Such as the mv def is as following: CREATE MATERIALIZED VIEW test1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') as SELECT id, type, actor, payload, payload['pull_request'] FROM github_events1; the query following can rewrite successfully and the data is right SELECT id, type, floor(cast(actor['id'] as int) + 100.5), actor['display_login'], payload['pull_request']['id'] FROM github_events1;
…#37929) Support variants rewrite by materialized view Such as the mv def is as following: CREATE MATERIALIZED VIEW test1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') as SELECT id, type, actor, payload, payload['pull_request'] FROM github_events1; the query following can rewrite successfully and the data is right SELECT id, type, floor(cast(actor['id'] as int) + 100.5), actor['display_login'], payload['pull_request']['id'] FROM github_events1;
Proposed changes
Support variants rewrite by materialized view
Such as the mv def is as following:
the query following can rewrite successfully and the data is right