This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new c506e4525b3 [pick](nereids) Ignore some node in 'explain shape plan'
command (#25753)
c506e4525b3 is described below
commit c506e4525b3dd2295a30c85cbec2774b78f75f81
Author: minghong <[email protected]>
AuthorDate: Tue Oct 24 15:51:42 2023 +0800
[pick](nereids) Ignore some node in 'explain shape plan' command (#25753)
---
.../java/org/apache/doris/nereids/trees/plans/Plan.java | 10 ++++++++--
.../main/java/org/apache/doris/qe/SessionVariable.java | 15 +++++++++++++++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/Plan.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/Plan.java
index 3eac26d2eeb..2f21b824554 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/Plan.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/Plan.java
@@ -26,6 +26,7 @@ import org.apache.doris.nereids.trees.expressions.Expression;
import org.apache.doris.nereids.trees.expressions.NamedExpression;
import org.apache.doris.nereids.trees.expressions.Slot;
import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor;
+import org.apache.doris.qe.ConnectContext;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
@@ -143,8 +144,13 @@ public interface Plan extends TreeNode<Plan> {
*/
default String shape(String prefix) {
StringBuilder builder = new StringBuilder();
- builder.append(prefix).append(shapeInfo()).append("\n");
- String childPrefix = prefix + "--";
+ String me = shapeInfo();
+ String prefixTail = "";
+ if (!
ConnectContext.get().getSessionVariable().getIgnoreShapePlanNodes().contains(me))
{
+ builder.append(prefix).append(shapeInfo()).append("\n");
+ prefixTail += "--";
+ }
+ String childPrefix = prefix + prefixTail;
children().forEach(
child -> {
builder.append(child.shape(childPrefix));
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 daeb9bedd8e..d6b99e1bee2 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
@@ -1174,6 +1174,21 @@ public class SessionVariable implements Serializable,
Writable {
description = {"是否启用更快的浮点数转换算法,注意会影响输出格式", "Set true to enable
faster float pointer number convert"})
public boolean fasterFloatConvert = false;
+ public static final String IGNORE_SHAPE_NODE = "ignore_shape_nodes";
+
+ public Set<String> getIgnoreShapePlanNodes() {
+ return
Arrays.stream(ignoreShapePlanNodes.split(",[\\s]*")).collect(ImmutableSet.toImmutableSet());
+ }
+
+ public void setIgnoreShapePlanNodes(String ignoreShapePlanNodes) {
+ this.ignoreShapePlanNodes = ignoreShapePlanNodes;
+ }
+
+ @VariableMgr.VarAttr(name = IGNORE_SHAPE_NODE,
+ description = {"'explain shape plan' 命令中忽略的PlanNode 类型",
+ "the plan node type which is ignored in 'explain shape
plan' command"})
+ public String ignoreShapePlanNodes = "";
+
// If this fe is in fuzzy mode, then will use initFuzzyModeVariables to
generate some variables,
// not the default value set in the code.
public void initFuzzyModeVariables() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]