Uh oh!
There was an error while loading. Please reload this page.
PHOENIX-7935 Propagate requested EXPLAIN options to nested plan contexts - #2544
Merged
Merged
Conversation
Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR ensures EXPLAIN option selections (e.g., VERBOSE, REGIONS, FORMAT JSON) are consistently applied throughout nested query plan structures, so child scans/subplans render with the same disclosure level as the root plan.
Changes:
- Propagates the parent plan’s
ExplainOptionsinto nested/childStatementContexts before composingExplainPlans. - Updates join/union plan explain composition to ensure both halves/branches/subplans render in the requested explain mode.
- Ensures client wrapper plans pass explain options through to their delegate plans (and associated contexts used for client-side filters).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| phoenix-core-client/src/main/java/org/apache/phoenix/execute/UnionPlan.java | Copies root ExplainOptions to each UNION branch context before composing branch explain plans. |
| phoenix-core-client/src/main/java/org/apache/phoenix/execute/TupleProjectionPlan.java | Copies delegate ExplainOptions onto the separate post-filter statementContext so verbose client filters render consistently. |
| phoenix-core-client/src/main/java/org/apache/phoenix/execute/SortMergeJoinPlan.java | Propagates ExplainOptions to both LHS/RHS plan contexts prior to building the combined explain plan. |
| phoenix-core-client/src/main/java/org/apache/phoenix/execute/HashJoinPlan.java | Propagates ExplainOptions to each hash-join subplan’s inner plan context before rendering subplan explain steps/attributes. |
| phoenix-core-client/src/main/java/org/apache/phoenix/execute/ClientScanPlan.java | Pushes wrapper context ExplainOptions down into the delegate plan context before delegating explain. |
| phoenix-core-client/src/main/java/org/apache/phoenix/execute/ClientAggregatePlan.java | Pushes wrapper context ExplainOptions down into the delegate plan context before delegating explain. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
asf-gitbox-commits pushed a commit
that referenced
this pull request
Jul 24, 2026
…xts (#2544) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
apurtell added a commit
to apurtell/phoenix
that referenced
this pull request
Aug 4, 2026
…xts (apache#2544) Co-authored-by: Claude Opus 4.8[1m] <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously
PhoenixStatementsetExplainOptionsonly on the root plan'sStatementContext. Nested plans (hash-join / semi-join / anti-join build sides,UNION ALLbranches, sort-merge-join halves, andClientScanPlan/ClientAggregatePlan/TupleProjectionPlanwrappers) kept their default options and rendered as plain explain output. Each parent'sgetExplainPlan()now copiesgetContext().getExplainOptions()onto its child plans' contexts before composing them.ExplainTableno longer special-cases the root scan.Co-authored-by: Claude Opus 4.8[1m] noreply@anthropic.com