-
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
[feature](mtmv)(3)Implementing multi table materialized views #26146
Conversation
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.
clang-tidy made some suggestions
- add show task/job infos method - add mtmv thread pool in disruptorGroupManager
return false; | ||
} | ||
|
||
public static MTMVCache generateMTMVCache(MTMV mtmv, ConnectContext ctx) { |
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.
Cache should contain mtmv self
private static final Logger LOG = LogManager.getLogger(MTMVCacheManager.class); | ||
private Map<BaseTableInfo, Set<BaseTableInfo>> tableMTMVs = Maps.newConcurrentMap(); | ||
|
||
public Set<BaseTableInfo> getMtmvsByBaseTable(BaseTableInfo table) { |
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.
Should also provide list method param to get materailzed view
and shoud return the materailzed caches
run buildall |
run feut |
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
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
PR approved by at least one committer and no changes requested. |
…#26146) Introduction to Main Classes: - MTMVService:MTMV services for other modules to call - MTMVHookService:All operations that affect the MTMV - MTMVJobManager:All operations that affect the MTMV job - MTMVCacheManager:All operations that affect the MTMV Cache - MTMVTask&MTMVJob:Inherit from job framework
…#26146) Introduction to Main Classes: - MTMVService:MTMV services for other modules to call - MTMVHookService:All operations that affect the MTMV - MTMVJobManager:All operations that affect the MTMV job - MTMVCacheManager:All operations that affect the MTMV Cache - MTMVTask&MTMVJob:Inherit from job framework
…zed view (#40658) ## Proposed changes This is brought by #26146 If create materialized view as following, Should fail, because has the duplicated column name `o_orderdatE` and `o_orderdate`. But now can create materialized view successfully. the pr fix this. ```sql CREATE MATERIALIZED VIEW mv_1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL partition by(o_orderdate) DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdatE, o_shippriority, o_comment, o_orderdate, sum(o_totalprice) as sum_total, max(o_totalpricE) as max_total, min(o_totalprice) as min_total, count(*) as count_all, bitmap_union(to_bitmap(case when o_shippriority > 1 and o_orderkey IN (1, 3) then o_custkey else null end)) cnt_1, bitmap_union(to_bitmap(case when o_shippriority > 2 and o_orderkey IN (2) then o_custkey else null end)) as cnt_2 from (select * from orders) as t1 group by o_orderdatE, o_shippriority, o_comment, o_orderdate; ```
…zed view (#40658) ## Proposed changes This is brought by #26146 If create materialized view as following, Should fail, because has the duplicated column name `o_orderdatE` and `o_orderdate`. But now can create materialized view successfully. the pr fix this. ```sql CREATE MATERIALIZED VIEW mv_1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL partition by(o_orderdate) DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdatE, o_shippriority, o_comment, o_orderdate, sum(o_totalprice) as sum_total, max(o_totalpricE) as max_total, min(o_totalprice) as min_total, count(*) as count_all, bitmap_union(to_bitmap(case when o_shippriority > 1 and o_orderkey IN (1, 3) then o_custkey else null end)) cnt_1, bitmap_union(to_bitmap(case when o_shippriority > 2 and o_orderkey IN (2) then o_custkey else null end)) as cnt_2 from (select * from orders) as t1 group by o_orderdatE, o_shippriority, o_comment, o_orderdate; ```
…zed view (apache#40658) This is brought by apache#26146 If create materialized view as following, Should fail, because has the duplicated column name `o_orderdatE` and `o_orderdate`. But now can create materialized view successfully. the pr fix this. ```sql CREATE MATERIALIZED VIEW mv_1 BUILD IMMEDIATE REFRESH AUTO ON MANUAL partition by(o_orderdate) DISTRIBUTED BY RANDOM BUCKETS 2 PROPERTIES ('replication_num' = '1') AS select o_orderdatE, o_shippriority, o_comment, o_orderdate, sum(o_totalprice) as sum_total, max(o_totalpricE) as max_total, min(o_totalprice) as min_total, count(*) as count_all, bitmap_union(to_bitmap(case when o_shippriority > 1 and o_orderkey IN (1, 3) then o_custkey else null end)) cnt_1, bitmap_union(to_bitmap(case when o_shippriority > 2 and o_orderkey IN (2) then o_custkey else null end)) as cnt_2 from (select * from orders) as t1 group by o_orderdatE, o_shippriority, o_comment, o_orderdate; ```
Proposed changes
Issue Number: close #xxx
Implement mtmv
Introduction to Main Classes:
Further comments
If this is a relatively large or complex change, kick off the discussion at [email protected] by explaining why you chose the solution you did and what alternatives you considered, etc...