Skip to content
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

branch-3.0: [chore](sink) enable_parallel_result_sink default value is changed to false #43933 #44241

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ public enum IgnoreSplitType {
private boolean enableSyncRuntimeFilterSize = true;

@VariableMgr.VarAttr(name = ENABLE_PARALLEL_RESULT_SINK, needForward = true, fuzzy = true)
private boolean enableParallelResultSink = true;
private boolean enableParallelResultSink = false;

@VariableMgr.VarAttr(name = "sort_phase_num", fuzzy = true, needForward = true,
description = {"如设置为1,则只生成1阶段sort,设置为2,则只生成2阶段sort,设置其它值,优化器根据代价选择sort类型",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.doris.catalog.Table;
import org.apache.doris.common.DdlException;
import org.apache.doris.common.FeConstants;
import org.apache.doris.planner.ExchangeNode;
import org.apache.doris.planner.OlapScanNode;
import org.apache.doris.planner.PlanFragment;
import org.apache.doris.planner.Planner;
Expand Down Expand Up @@ -120,7 +121,8 @@ public void testCreateDbAndTable() throws Exception {
}
// 5. query
// TODO: we can not process real query for now. So it has to be a explain query
String queryStr = "explain select /*+ SET_VAR(disable_nereids_rules=PRUNE_EMPTY_PARTITION) */ * from db1.tbl1";
String queryStr = "explain select /*+ SET_VAR(disable_nereids_rules=PRUNE_EMPTY_PARTITION, "
+ "enable_parallel_result_sink=true) */ * from db1.tbl1";
StmtExecutor stmtExecutor = new StmtExecutor(ctx, queryStr);
stmtExecutor.execute();
Planner planner = stmtExecutor.planner();
Expand All @@ -129,5 +131,16 @@ public void testCreateDbAndTable() throws Exception {
PlanFragment fragment = fragments.get(0);
Assert.assertTrue(fragment.getPlanRoot() instanceof OlapScanNode);
Assert.assertEquals(0, fragment.getChildren().size());

queryStr = "explain select /*+ SET_VAR(disable_nereids_rules=PRUNE_EMPTY_PARTITION, "
+ "enable_parallel_result_sink=false) */ * from db1.tbl1";
stmtExecutor = new StmtExecutor(ctx, queryStr);
stmtExecutor.execute();
planner = stmtExecutor.planner();
fragments = planner.getFragments();
Assert.assertEquals(2, fragments.size());
fragment = fragments.get(0);
Assert.assertTrue(fragment.getPlanRoot() instanceof ExchangeNode);
Assert.assertEquals(1, fragment.getChildren().size());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.doris.catalog.OlapTable;
import org.apache.doris.catalog.Table;
import org.apache.doris.common.FeConstants;
import org.apache.doris.planner.ExchangeNode;
import org.apache.doris.planner.OlapScanNode;
import org.apache.doris.planner.PlanFragment;
import org.apache.doris.planner.Planner;
Expand Down Expand Up @@ -108,7 +109,8 @@ public void testCreateDbAndTable() throws Exception {

// 7. query
// TODO: we can not process real query for now. So it has to be a explain query
String queryStr = "explain select /*+ SET_VAR(disable_nereids_rules=PRUNE_EMPTY_PARTITION) */ * from db1.tbl1";
String queryStr = "explain select /*+ SET_VAR(disable_nereids_rules=PRUNE_EMPTY_PARTITION, "
+ "enable_parallel_result_sink=true) */ * from db1.tbl1";
StmtExecutor stmtExecutor = new StmtExecutor(connectContext, queryStr);
stmtExecutor.execute();
Planner planner = stmtExecutor.planner();
Expand All @@ -117,5 +119,16 @@ public void testCreateDbAndTable() throws Exception {
PlanFragment fragment = fragments.get(0);
Assertions.assertTrue(fragment.getPlanRoot() instanceof OlapScanNode);
Assertions.assertEquals(0, fragment.getChildren().size());

queryStr = "explain select /*+ SET_VAR(disable_nereids_rules=PRUNE_EMPTY_PARTITION, "
+ "enable_parallel_result_sink=false) */ * from db1.tbl1";
stmtExecutor = new StmtExecutor(connectContext, queryStr);
stmtExecutor.execute();
planner = stmtExecutor.planner();
fragments = planner.getFragments();
Assertions.assertEquals(2, fragments.size());
fragment = fragments.get(0);
Assertions.assertTrue(fragment.getPlanRoot() instanceof ExchangeNode);
Assertions.assertEquals(1, fragment.getChildren().size());
}
}
Loading