apurtell opened a new pull request, #2513: URL: https://github.com/apache/phoenix/pull/2513
Capture the query optimizer's index selection rationale with a new data model and a closed set of `RULE_*` and `REASON_*` string constants plumbed through `QueryPlan`/`BaseQueryPlan`/`DelegateQueryPlan`. `AddPlanResult` returns from the two `addPlan` overloads, and a `DecisionState` accumulator is threaded through. A new helper method assigns the winning rule and collected rejections. New `ExplainPlanAttributes` fields `indexRule` and `indexRejected` are set in `BaseQueryPlan` from `getOptimizerDecision()`, with matching `ExplainPlanTestUtil` fluent assertions `indexRule`, `indexRuleStartsWith`, `indexRejectedCount`, `indexRejected`, and `indexRejectedNone`. EXPLAIN output gains 'INDEX <name> [<kind>] [/* <rule> */]' for chosen index and one '/* !INDEX <name> -- <reason> */' line per rejected index. Co-authored-by: Claude Opus 4.8[1m] <[email protected]> -- 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]
