From 9add76b4d24911ea8c792ba026cd950b9b637cbe Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 22:07:54 -0800 Subject: [PATCH] branch-3.0: [bugfix](hive)Fix split assignment leak. releated to issue (#40683). #44845 (#45143) Cherry-picked from #44845 Co-authored-by: sparrow <38098988+biohazard4321@users.noreply.github.com> --- .../main/java/org/apache/doris/datasource/FileScanNode.java | 1 - .../doris/nereids/trees/plans/commands/ExplainCommand.java | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java index 9845c0070fc430..29fdb2b09acfcd 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java +++ b/fe/fe-core/src/main/java/org/apache/doris/datasource/FileScanNode.java @@ -126,7 +126,6 @@ public String getNodeExplainString(String prefix, TExplainLevel detailLevel) { output.append(prefix); if (isBatchMode()) { output.append("(approximate)"); - splitAssignment.stop(); } output.append("inputSplitNum=").append(selectedSplitNum).append(", totalFileSize=") .append(totalFileSize).append(", scanRanges=").append(scanRangeLocations.size()).append("\n"); diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExplainCommand.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExplainCommand.java index d4fce906693a68..e3f2f1d732ae5a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExplainCommand.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/ExplainCommand.java @@ -27,6 +27,7 @@ import org.apache.doris.nereids.trees.plans.PlanType; import org.apache.doris.nereids.trees.plans.logical.LogicalPlan; import org.apache.doris.nereids.trees.plans.visitor.PlanVisitor; +import org.apache.doris.planner.ScanNode; import org.apache.doris.qe.ConnectContext; import org.apache.doris.qe.StmtExecutor; @@ -95,6 +96,9 @@ public void run(ConnectContext ctx, StmtExecutor executor) throws Exception { } else { executor.handleExplainStmt(planner.getExplainString(explainOptions), true); } + for (ScanNode scanNode : planner.getScanNodes()) { + scanNode.stop(); + } } @Override