-
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
[Fix](nereids) Fix get ralated partition table when nodata #29453
[Fix](nereids) Fix get ralated partition table when nodata #29453
Conversation
run buildall |
1 similar comment
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
TPC-DS test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpcds-tools
|
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
TPC-DS test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpcds-tools
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
07e346f
to
4d31391
Compare
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
TPC-DS test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpcds-tools
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
@@ -60,6 +60,21 @@ public static ConnectContext createMTMVContext(MTMV mtmv) throws AnalysisExcepti | |||
return ctx; | |||
} | |||
|
|||
public static ConnectContext createMTMVContext(long ctlId, long dbId) throws AnalysisException { |
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.
There is some overlap with the logic of createMTMVContext (MTMV mtmv), abstract it a bit
try { | ||
// we want to set session variable, so need to new connectContext avoid influence other query | ||
statementContext.setConnectContext( | ||
MTMVPlanUtil.createMTMVContext(this.envInfo.getCtlId(), this.envInfo.getDbId())); |
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.
Creating a new ctx here may not be a good method. How about setting environment variables on the ctx of crude oil and setting them back after the method ends? Or there may be other methods instead of using the environment variable setDisableNereidsRules
run buildall |
run buidall |
try { | ||
analyzePartition(planner); | ||
} finally { | ||
if (!tempDisableRules.isEmpty()) { |
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 not add this if
, always set back
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.
OK, I will fix it
run buildall |
3 similar comments
run buildall |
run buildall |
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
TPC-DS test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpcds-tools
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
run buildall |
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
TPC-H test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpch-tools
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
TPC-DS test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G', run with scripts in https://github.com/apache/doris/tree/master/tools/tpcds-tools
|
e3c3cfc
to
1ee2e7a
Compare
run buildall |
63fd280
to
d8119a0
Compare
run buildall |
(From new machine)TeamCity pipeline, clickbench performance test result: |
TPC-H: Total hot run time: 38625 ms
|
TPC-DS: Total hot run time: 182979 ms
|
run buildall |
PR approved by anyone and no changes requested. |
TPC-H: Total hot run time: 38549 ms
|
TPC-DS: Total hot run time: 183619 ms
|
(From new machine)TeamCity pipeline, clickbench performance test result: |
PR approved by at least one committer and no changes requested. |
Support to create partition materialized view using nodata table Such as the table def as following: > CREATE TABLE `test_no_data` ( > `user_id` LARGEINT NOT NULL COMMENT '"用户id"', > `date` DATE NOT NULL COMMENT '"数据灌入日期时间"', > `num` SMALLINT NOT NULL COMMENT '"数量"' > ) ENGINE=OLAP > DUPLICATE KEY(`user_id`, `date`, `num`) > COMMENT 'OLAP' > PARTITION BY RANGE(`date`) > (PARTITION p201701_1000 VALUES [('0000-01-01'), ('2017-02-01')), > PARTITION p201702_2000 VALUES [('2017-02-01'), ('2017-03-01')), > PARTITION p201703_all VALUES [('2017-03-01'), ('2017-04-01'))) > DISTRIBUTED BY HASH(`user_id`) BUCKETS 2 > PROPERTIES ('replication_num' = '1') ; when table test_no_data has no data, it also support to create partition materialized view as following: > CREATE MATERIALIZED VIEW no_data_partition_mv > BUILD IMMEDIATE REFRESH AUTO ON MANUAL > partition by(`date`) > DISTRIBUTED BY RANDOM BUCKETS 2 > PROPERTIES ('replication_num' = '1') > AS > SELECT * FROM test_no_data where date > '2017-05-01'; >
) Support to create partition materialized view using nodata table Such as the table def as following: > CREATE TABLE `test_no_data` ( > `user_id` LARGEINT NOT NULL COMMENT '"用户id"', > `date` DATE NOT NULL COMMENT '"数据灌入日期时间"', > `num` SMALLINT NOT NULL COMMENT '"数量"' > ) ENGINE=OLAP > DUPLICATE KEY(`user_id`, `date`, `num`) > COMMENT 'OLAP' > PARTITION BY RANGE(`date`) > (PARTITION p201701_1000 VALUES [('0000-01-01'), ('2017-02-01')), > PARTITION p201702_2000 VALUES [('2017-02-01'), ('2017-03-01')), > PARTITION p201703_all VALUES [('2017-03-01'), ('2017-04-01'))) > DISTRIBUTED BY HASH(`user_id`) BUCKETS 2 > PROPERTIES ('replication_num' = '1') ; when table test_no_data has no data, it also support to create partition materialized view as following: > CREATE MATERIALIZED VIEW no_data_partition_mv > BUILD IMMEDIATE REFRESH AUTO ON MANUAL > partition by(`date`) > DISTRIBUTED BY RANDOM BUCKETS 2 > PROPERTIES ('replication_num' = '1') > AS > SELECT * FROM test_no_data where date > '2017-05-01'; >
) Support to create partition materialized view using nodata table Such as the table def as following: > CREATE TABLE `test_no_data` ( > `user_id` LARGEINT NOT NULL COMMENT '"用户id"', > `date` DATE NOT NULL COMMENT '"数据灌入日期时间"', > `num` SMALLINT NOT NULL COMMENT '"数量"' > ) ENGINE=OLAP > DUPLICATE KEY(`user_id`, `date`, `num`) > COMMENT 'OLAP' > PARTITION BY RANGE(`date`) > (PARTITION p201701_1000 VALUES [('0000-01-01'), ('2017-02-01')), > PARTITION p201702_2000 VALUES [('2017-02-01'), ('2017-03-01')), > PARTITION p201703_all VALUES [('2017-03-01'), ('2017-04-01'))) > DISTRIBUTED BY HASH(`user_id`) BUCKETS 2 > PROPERTIES ('replication_num' = '1') ; when table test_no_data has no data, it also support to create partition materialized view as following: > CREATE MATERIALIZED VIEW no_data_partition_mv > BUILD IMMEDIATE REFRESH AUTO ON MANUAL > partition by(`date`) > DISTRIBUTED BY RANDOM BUCKETS 2 > PROPERTIES ('replication_num' = '1') > AS > SELECT * FROM test_no_data where date > '2017-05-01'; >
Proposed changes
Support to create partition materialized view using nodata table
Such as the table def as following:
when table test_no_data has no data, it also support to create partition materialized view as following:
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...