[ 
https://issues.apache.org/jira/browse/PHOENIX-933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14059122#comment-14059122
 ] 

ASF GitHub Bot commented on PHOENIX-933:
----------------------------------------

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

    https://github.com/apache/phoenix/pull/1#discussion_r14835021
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/compile/JoinCompiler.java ---
    @@ -1037,8 +1038,13 @@ public static SelectStatement 
optimize(StatementContext context, SelectStatement
                 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 = 
context.getConnection().getQueryServices().getOptimizer().optimize(statement, 
stmt);
    +            boolean localIndex = 
plan.getContext().getCurrentTable().getTable().getIndexType()==IndexType.LOCAL;
    +            Scan scan = plan.getContext().getScan();
    +            boolean useLocalIndex = localIndex && 
plan.getContext().getDataColumns().isEmpty();
                 if (!plan.getTableRef().equals(tableRef)) {
    -                replacement.put(tableRef, plan.getTableRef());            
    +                if (!localIndex || useLocalIndex) {
    --- End diff --
    
    comment added.


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

Reply via email to