gortiz opened a new pull request, #19447:
URL: https://github.com/apache/pinot/pull/19447
`QueryRunner#explainQuery` builds per-stage EXPLAIN output by asking each
leaf-stage operator to
describe itself, but it recognizes only `LeafOperator` via an `instanceof`
check. Any alternative
leaf-stage operator that runs the single-stage engine and can produce an
`ExplainedNode` is silently
skipped, so EXPLAIN for that stage falls back to the pre-execution (Calcite)
plan instead of
reflecting what actually executes.
This adds a minimal extension point:
- New interface `ExplainableOperator` (`pinot-query-runtime`, `operator`
package) — a single
`ExplainedNode explain()`.
- `LeafOperator implements ExplainableOperator` — its existing `explain()`
already matches, so this
is a no-op.
- `QueryRunner#explainQuery` widens the collector from `instanceof
LeafOperator` to
`instanceof ExplainableOperator`.
## Impact / compatibility
- No behavior change: `LeafOperator` is the only implementor in the OSS
tree, so EXPLAIN output is
identical.
- Enables custom/alternative leaf-stage operators to contribute their
explain subtree through the
existing ask-servers splice path (`AskingServerStageExplainer` ->
`modifyRel`).
## Testing
Pure refactor + extension point; covered by existing multi-stage EXPLAIN
tests that exercise
`LeafOperator`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]