This is an automated email from the ASF dual-hosted git repository.
englefly pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 9d57db1c328 [opt](nereids) add dphyper limit configuration (#38739)
9d57db1c328 is described below
commit 9d57db1c328828dbd48d42261f3c2dfdfb62706c
Author: xzj7019 <[email protected]>
AuthorDate: Mon Aug 5 13:57:55 2024 +0800
[opt](nereids) add dphyper limit configuration (#38739)
## Proposed changes
Issue Number: close #xxx
Make dphyper limit configurable.
Co-authored-by: zhongjian.xzj
<[email protected]>
---
.../java/org/apache/doris/nereids/jobs/joinorder/JoinOrderJob.java | 4 +++-
fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java | 5 ++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/JoinOrderJob.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/JoinOrderJob.java
index 08e40f84a6c..9b9f2f9fe4b 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/JoinOrderJob.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/joinorder/JoinOrderJob.java
@@ -79,8 +79,10 @@ public class JoinOrderJob extends Job {
builder.updateNode(node.getIndex(),
optimizePlan(dPhyperNode.getGroup()));
}
HyperGraph hyperGraph = builder.build();
- // TODO: Right now, we just hardcode the limit with 10000, maybe we
need a better way to set it
int limit = 1000;
+ if (this.context.getCascadesContext().getConnectContext() != null) {
+ limit =
this.context.getCascadesContext().getConnectContext().getSessionVariable().dphyperLimit;
+ }
PlanReceiver planReceiver = new PlanReceiver(this.context, limit,
hyperGraph,
group.getLogicalProperties().getOutputSet());
if (!tryEnumerateJoin(hyperGraph, planReceiver, limit)) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index e1fabc5a16a..94b33b3fbb9 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -303,7 +303,7 @@ public class SessionVariable implements Serializable,
Writable {
= "trim_tailing_spaces_for_external_table_query";
public static final String ENABLE_DPHYP_OPTIMIZER =
"enable_dphyp_optimizer";
-
+ public static final String DPHYPER_LIMIT = "dphyper_limit";
public static final String ENABLE_LEFT_ZIG_ZAG = "enable_left_zig_zag";
public static final String NTH_OPTIMIZED_PLAN = "nth_optimized_plan";
@@ -1546,6 +1546,9 @@ public class SessionVariable implements Serializable,
Writable {
@VariableMgr.VarAttr(name = "memo_max_group_expression_size")
public int memoMaxGroupExpressionSize = 10000;
+ @VariableMgr.VarAttr(name = DPHYPER_LIMIT)
+ public int dphyperLimit = 1000;
+
@VariableMgr.VarAttr(name = ENABLE_MINIDUMP)
public boolean enableMinidump = false;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]