-
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
[Feat](nereids)when dealing insert into stmt with empty table source, fe returns directly #34418
[Feat](nereids)when dealing insert into stmt with empty table source, fe returns directly #34418
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
""" | ||
|
||
sql """ | ||
create table insert_select_empty_table2(pk int, a int, b int) distributed by hash(pk) buckets 10 |
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.
consider adding more cases, such as join, union and etc.
run buildall |
TPC-H: Total hot run time: 41682 ms
|
TPC-DS: Total hot run time: 184747 ms
|
...c/main/java/org/apache/doris/nereids/trees/plans/commands/insert/InsertIntoTableCommand.java
Outdated
Show resolved
Hide resolved
d87c9f6
to
05cb2c3
Compare
run buildall |
1 similar comment
run buildall |
|
run buildall |
4 similar comments
run buildall |
run buildall |
run buildall |
run buildall |
TPC-H: Total hot run time: 39602 ms
|
TPC-DS: Total hot run time: 186386 ms
|
… the fe return directly
… the fe return directly
409aaad
to
4a4b6c0
Compare
TPC-H: Total hot run time: 40244 ms
|
TPC-DS: Total hot run time: 188303 ms
|
run buildall |
run feut |
是不是可以直接扩展 EliminateEmptyRelation rule? 所有node直接裁剪了 |
@@ -88,7 +88,7 @@ | |||
*/ | |||
public class CreateMTMVInfo { | |||
public static final Logger LOG = LogManager.getLogger(CreateMTMVInfo.class); | |||
public static final String MTMV_PLANER_DISABLE_RULES = "OLAP_SCAN_PARTITION_PRUNE"; | |||
public static final String MTMV_PLANER_DISABLE_RULES = "OLAP_SCAN_PARTITION_PRUNE,PRUNE_EMPTY_PARTITION"; |
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.
@seawinde disable this rule will lead to mv have more partition than query?
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.
the mv plan used by query rewrite is generated by org.apache.doris.mtmv.MTMVCache#from
which runs the same rules as query.
MTMV_PLANER_DISABLE_RULES
is only used by mv meta check when create mtmv. it seems has no problems
PR approved by anyone and no changes requested. |
PR approved by at least one committer and no changes requested. |
…, fe returns directly (apache#34418) When a LogicalOlapScan has no partitions, transform it to a LogicalEmptyRelation. When dealing insert into stmt with empty table source, fe returns directly.
This bug introduced by #34418. Some operators can produce data even if the input is an empty table, such as AGGREGATE. Therefore, it is necessary to check whether sink's child is in an empty relation. Only when the child is in an empty relation can it return directly without performing actual data insertion.
…, fe returns directly (apache#34418) When a LogicalOlapScan has no partitions, transform it to a LogicalEmptyRelation. When dealing insert into stmt with empty table source, fe returns directly.
… fe returns directly (#35333) * [Feat](nereids) when dealing insert into stmt with empty table source, fe returns directly (#34418) When a LogicalOlapScan has no partitions, transform it to a LogicalEmptyRelation. When dealing insert into stmt with empty table source, fe returns directly. * [Fix](nereids) fix when insert into select empty table --------- Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
This bug introduced by #34418. Some operators can produce data even if the input is an empty table, such as AGGREGATE. Therefore, it is necessary to check whether sink's child is in an empty relation. Only when the child is in an empty relation can it return directly without performing actual data insertion.
This bug introduced by apache#34418. Some operators can produce data even if the input is an empty table, such as AGGREGATE. Therefore, it is necessary to check whether sink's child is in an empty relation. Only when the child is in an empty relation can it return directly without performing actual data insertion.
When a LogicalOlapScan has no partitions, transform it to a LogicalEmptyRelation.
When dealing insert into stmt with empty table source, fe returns directly.