diff --git a/pinot-core/src/main/java/org/apache/pinot/core/common/Operator.java b/pinot-core/src/main/java/org/apache/pinot/core/common/Operator.java index b6abbcb266ea..760074538b4e 100644 --- a/pinot-core/src/main/java/org/apache/pinot/core/common/Operator.java +++ b/pinot-core/src/main/java/org/apache/pinot/core/common/Operator.java @@ -51,6 +51,9 @@ public interface Operator { default void prepareForExplainPlan(ExplainPlanRows explainPlanRows) { } + default void postExplainPlan(ExplainPlanRows explainPlanRows) { + } + default void explainPlan(ExplainPlanRows explainPlanRows, int[] globalId, int parentId) { prepareForExplainPlan(explainPlanRows); String explainPlanString = toExplainString(); @@ -66,6 +69,7 @@ default void explainPlan(ExplainPlanRows explainPlanRows, int[] globalId, int pa child.explainPlan(explainPlanRows, globalId, parentId); } } + postExplainPlan(explainPlanRows); } /** diff --git a/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java b/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java index 2b7229243146..0f535b780638 100644 --- a/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java +++ b/pinot-core/src/main/java/org/apache/pinot/core/operator/AcquireReleaseColumnsSegmentOperator.java @@ -92,6 +92,11 @@ public void prepareForExplainPlan(ExplainPlanRows explainPlanRows) { materializeChildOperator(); } + @Override + public void postExplainPlan(ExplainPlanRows explainPlanRows) { + release(); + } + @Override public String toExplainString() { return EXPLAIN_NAME;