Skip to content

Commit

Permalink
Early release AcquireReleaseColumnsSegmentOperator during explain plan (
Browse files Browse the repository at this point in the history
apache#11945)

Co-authored-by: Saurabh Dubey <[email protected]>
  • Loading branch information
saurabhd336 and Saurabh Dubey authored Nov 3, 2023
1 parent bbeb1da commit 18639b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public interface Operator<T extends Block> {
default void prepareForExplainPlan(ExplainPlanRows explainPlanRows) {
}

default void postExplainPlan(ExplainPlanRows explainPlanRows) {
}

default void explainPlan(ExplainPlanRows explainPlanRows, int[] globalId, int parentId) {
prepareForExplainPlan(explainPlanRows);
String explainPlanString = toExplainString();
Expand All @@ -66,6 +69,7 @@ default void explainPlan(ExplainPlanRows explainPlanRows, int[] globalId, int pa
child.explainPlan(explainPlanRows, globalId, parentId);
}
}
postExplainPlan(explainPlanRows);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ public void prepareForExplainPlan(ExplainPlanRows explainPlanRows) {
materializeChildOperator();
}

@Override
public void postExplainPlan(ExplainPlanRows explainPlanRows) {
release();
}

@Override
public String toExplainString() {
return EXPLAIN_NAME;
Expand Down

0 comments on commit 18639b9

Please sign in to comment.