apurtell opened a new pull request, #2526:
URL: https://github.com/apache/phoenix/pull/2526

   `EXPLAIN (VERBOSE)` implements the VERBOSE-gated disclosures for projections 
, predicate-origin attribution on `SERVER FILTER BY` / `CLIENT FILTER BY`, and 
ignored hints.
   
   The `verbose` flag is threaded from `ExplainOptions` onto 
`StatementContext`. `ExplainPlanAttributes.serverProject : List<String>` is 
populated from `plan.getProjector().getColumnProjectors()`.
   
   The per-scan `/* !INDEX <name> -- <reason> */` text is now gated on 
`verbose`. The chosen-plan `INDEX <name> [<kind>]  /* <rule> */` line stays in 
plain `EXPLAIN` and `indexRejected` populates in both modes.
   
   `ExplainPlanAttributes` adds `serverFilters : List<{expr, origin : 
List<String>, pathTestSubtag : String}>`. `StatementContext` adds 
`predicateOrigins : Map<Expression, Set<String>>` with `tagPredicate(...)` / 
`getPredicateOrigins()`, populated by `WhereCompiler`, `HavingCompiler`, 
`JoinCompiler`, `IndexStatementRewriter`, and `RVCOffsetCompiler`. Under 
VERBOSE a fully-tagged `AndExpression` fans out to one `SERVER FILTER BY 
(<child>)  -- <child-origin>` per child, otherwise a single line carries the 
comma-separated union. `JsonExistsFunction` / `BsonConditionExpressionFunction` 
append `(JSON EXISTS)` / `(BSON CONDITION)`.
   
   For ignored hints `StatementContext` adds `Map<Hint, IgnoredHintReason>` 
populated at `Hint.NO_INDEX`, `Hint.USE_SORT_MERGE_JOIN`, and `Hint.SMALL`. 
Under VERBOSE `ExplainTable` emits one `/*- HINT(args) -- <reason> */` per 
ignored hint, including partially honored hints. 
   
   `clientFilters` collects every `CLIENT FILTER BY` site in `ClientScanPlan`, 
`ClientAggregatePlan`, `FilterResultIterator`, 
`FilterAggregatingResultIterator`, and `TupleProjectionPlan`. 
`ExplainPlanTestUtil` adds fluent getters, setters, and testers. 
`ExplainJsonNormalizer` recurses `serverFilters` / `clientFilters`.
   
   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]

Reply via email to