You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Andrew Kyle Purtell (Jira)" <ji...@apache.org> on 2026/06/12 18:22:00 UTC

[jira] [Resolved] (PHOENIX-7903) Functional index match rule EXPLAIN disclosure

     [ https://issues.apache.org/jira/browse/PHOENIX-7903?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Kyle Purtell resolved PHOENIX-7903.
------------------------------------------
    Resolution: Fixed

> Functional index match rule EXPLAIN disclosure
> ----------------------------------------------
>
>                 Key: PHOENIX-7903
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7903
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: Andrew Kyle Purtell
>            Assignee: Andrew Kyle Purtell
>            Priority: Major
>             Fix For: PHOENIX-7876-feature
>
>
> Disclose {{OptimizerReasons}} for functional indexes. The chosen functional index's per-scan {{INDEX}} line gains the rule {{matches <expr>}} where {{<expr>}} is the user's path expression. Candidates discarded because no query expression matched their indexed expression are tagged {{path expression does not match}}. {{QueryOptimizer.recordDecision}}, {{labelComparatorRule}}, and the {{RULE_ONLY_CANDIDATE}} path in {{getApplicablePlansForSingleFlatQuery}} override the rule label with {{OptimizerReasons.matches(sourceExpression.toString())}} when the winning candidate is a functional index, sourcing {{sourceExpression}} from  {{StatementContext.getIndexExpressionSubstitutions()}} of the winning index. {{QueryOptimizer.addPlan}} and {{tagComparatorRejections}} switch the rejection tag for functional index candidates to {{REASON_PATH_EXPRESSION_DOES_NOT_MATCH}}. A functional index is detected by an index column with a non-null {{PColumn.getExpressionStr()}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)