Copilot commented on code in PR #2531:
URL: https://github.com/apache/phoenix/pull/2531#discussion_r3410526099


##########
phoenix-core-client/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java:
##########
@@ -970,9 +972,32 @@ private static QueryPlan recordDecision(QueryPlan winner, 
String rule, DecisionS
     winner.setOptimizerDecision(
       new 
OptimizerDecision(winner.getTableRef().getTable().getTableName().getString(), 
rule,
         state == null ? null : state.getRejections()));
+    recordFunctionalIndexExpressionBreadcrumbs(winner);
     return winner;

Review Comment:
   The new functional-index rewrite breadcrumb emission (via 
recordFunctionalIndexExpressionBreadcrumbs) changes EXPLAIN output, but there’s 
no regression test covering the intended behavior (one breadcrumb per 
actually-applied substitution, only for the winning index plan). Adding an 
ExplainPlanTest that creates a functional index and asserts the EXPLAIN 
disclosure contains the expected "REWRITE INDEX EXPRESSION <expr> AS <col>" 
line would help prevent future regressions.



-- 
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