Github user maryannxue commented on a diff in the pull request:

    https://github.com/apache/incubator-phoenix/pull/28#discussion_r11557196
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/optimize/QueryOptimizer.java ---
    @@ -80,7 +80,7 @@ public QueryPlan optimize(QueryPlan dataPlan, 
PhoenixStatement statement, List<?
             // TODO: the recompile for the index tables could skip the 
normalize step
             SelectStatement select = (SelectStatement)dataPlan.getStatement();
             // TODO: consider not even compiling index plans if we have a 
point lookup
    -        if (!useIndexes || select.isJoin()) {
    +        if (!useIndexes || select.isJoin() || 
dataPlan.getContext().getResolver().getTables().size() > 1) {
    --- End diff --
    
    This is for explainPlan(). Somehow, we would want all join-compiler 
generated plans to avoid calling optimize again in explain. Thought of adding a 
flag into the BasicQueryPlan class or to the explainPlan() interface indicating 
where  optimize() should be called in explainPlan(), but was not sure if it's 
worth it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to