[ https://issues.apache.org/jira/browse/PHOENIX-933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14061074#comment-14061074 ]
ASF GitHub Bot commented on PHOENIX-933: ---------------------------------------- Github user chrajeshbabu commented on a diff in the pull request: https://github.com/apache/phoenix/pull/3#discussion_r14897862 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java --- @@ -1134,8 +1135,15 @@ public static SelectStatement optimize(PhoenixStatement statement, SelectStateme List<OrderByNode> orderBy = tableRef.equals(orderByTableRef) ? select.getOrderBy() : null; SelectStatement stmt = getSubqueryForOptimizedPlan(select.getHint(), table.getDynamicColumns(), tableRef, join.getColumnRefs(), table.getPreFiltersCombined(), groupBy, orderBy, table.isWildCardSelect()); QueryPlan plan = statement.getConnection().getQueryServices().getOptimizer().optimize(statement, stmt); + boolean localIndex = plan.getContext().getCurrentTable().getTable().getIndexType()==IndexType.LOCAL; if (!plan.getTableRef().equals(tableRef)) { - replacement.put(tableRef, plan.getTableRef()); + // Use local index plan only when all the columns to project are available in index. --- End diff -- This change is not required in the master branch James. In local-index branch join queries have failed with ColumnNotFoundException with local indexes when join query has columns other than index. So I have added the check. Currently join back from data table is not supported in join queries. > Local index support to Phoenix > ------------------------------ > > Key: PHOENIX-933 > URL: https://issues.apache.org/jira/browse/PHOENIX-933 > Project: Phoenix > Issue Type: New Feature > Reporter: rajeshbabu > > Hindex(https://github.com/Huawei-Hadoop/hindex) provides local indexing > support to HBase. It stores region level index in a separate table, and > co-locates the user and index table regions with a custom load balancer. > See http://goo.gl/phkhwC and http://goo.gl/EswlxC for more information. > This JIRA addresses the local indexing solution integration to phoenix. -- This message was sent by Atlassian JIRA (v6.2#6252)