[feature](mtmv) Support querying rewrite by materialized view when DML such as insert and insert overwrite #37561
[feature](mtmv) Support querying rewrite by materialized view when DML such as insert and insert overwrite #37561seawinde wants to merge 1 commit intoapache:masterfrom
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
2 similar comments
|
run buildall |
|
run buildall |
TPC-H: Total hot run time: 40869 ms |
TPC-DS: Total hot run time: 175187 ms |
ClickBench: Total hot run time: 30.38 s |
|
PR approved by anyone and no changes requested. |
|
run buildall |
TPC-H: Total hot run time: 40186 ms |
TPC-DS: Total hot run time: 172714 ms |
ClickBench: Total hot run time: 30.31 s |
46f9756 to
d0e868c
Compare
|
run buildall |
TPC-H: Total hot run time: 39985 ms |
TPC-DS: Total hot run time: 171118 ms |
ClickBench: Total hot run time: 30.77 s |
|
run buildall |
TPC-H: Total hot run time: 39725 ms |
TPC-DS: Total hot run time: 174677 ms |
ClickBench: Total hot run time: 30.71 s |
|
run buildall |
TPC-H: Total hot run time: 40142 ms |
TPC-DS: Total hot run time: 174149 ms |
ClickBench: Total hot run time: 30.7 s |
|
run buildall |
TPC-H: Total hot run time: 40096 ms |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
|
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 39702 ms |
TPC-DS: Total hot run time: 173964 ms |
ClickBench: Total hot run time: 31.09 s |
| LOG.debug("Start analyze plan"); | ||
| } | ||
| keepOrShowPlanProcess(showPlanProcess, () -> cascadesContext.newAnalyzer().analyze()); | ||
| if (this.cascadesContext.getConnectContext().getSessionVariable().isEnableDmlMaterializedViewRewrite() |
There was a problem hiding this comment.
u should add a analysis rule and check do this in rule. move hooks from NereidsPlanner into StatementContext
| = "enable_dml_materialized_view_rewrite"; | ||
|
|
||
| public static final String ENABLE_DML_MATERIALIZED_VIEW_REWRITE_WHEN_BASE_TABLE_UNAWARENESS | ||
| = "enable_dml_materialized_view_rewrite_when_base_table_unawareness"; |
There was a problem hiding this comment.
unawareness? is it a standard phrases?
|
run buildall |
TPC-H: Total hot run time: 39975 ms |
TPC-DS: Total hot run time: 172991 ms |
ClickBench: Total hot run time: 30.88 s |
|
run buildall |
TPC-H: Total hot run time: 39795 ms |
TPC-DS: Total hot run time: 174140 ms |
ClickBench: Total hot run time: 30.64 s |
|
PR approved by at least one committer and no changes requested. |
| @Override | ||
| public List<Rule> buildRules() { | ||
| return ImmutableList.of( | ||
| RuleType.INIT_MATERIALIZATION_HOOK_FOR_FILE_SINK.build(logicalFileSink() |
There was a problem hiding this comment.
could use any().when(LogicalTableSink.class::isInstanceOf)
…sert and insert overwrite dml
ac8d705 to
ad9f822
Compare
|
this is replaced by #38115, this branch rebase wrongly, it doesn't modify the meta etc |
Proposed changes
Support querying rewrite by materialized view when DML such as insert and insert overwrite , into outfile etc.
this is default enable, you can disable it by
set enable_dml_materialized_view_rewrite = falseand the
enable_materialized_view_rewriteis only control DQL.It would not rewrite by materialized view when query sql use external table.
If you want rewrite by materialized view when use external table in DML,
you should
set enable_dml_materialized_view_rewrite_when_base_table_unawareness = true;this is default false.
this pr is replaced by #38115