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

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

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

    https://github.com/apache/phoenix/pull/3#discussion_r14860075
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -568,8 +629,13 @@ public MutationState createIndex(CreateIndexStatement 
statement, byte[][] splits
                         allPkColumns.add(new Pair<ColumnName, 
SortOrder>(colName, col.getSortOrder()));
                         columnDefs.add(FACTORY.columnDef(colName, 
dataType.getSqlTypeName(), col.isNullable(), col.getMaxLength(), 
col.getScale(), false, SortOrder.getDefault()));
                     }
    -                if (dataTable.getType() == PTableType.VIEW && 
dataTable.getViewType() != ViewType.MAPPED) {
    -                    allocateViewIndexId = true;
    +                /*
    +                 * Allocate an index ID in two circumstances:
    +                 * 1) for a local index, as all local indexes will reside 
in the same HBase table
    +                 * 2) for a view on an index.
    +                 */
    +                if (statement.getIndexType() == IndexType.LOCAL || 
(dataTable.getType() == PTableType.VIEW && dataTable.getViewType() != 
ViewType.MAPPED)) {
    +                    allocateIndexId = true;
    --- End diff --
    
    Add check here for if (dataTable.isImmutableRows() && 
statement.getIndexType() == IndexType.LOCAL) and just throw a SQLException with 
a new error code that local indexes aren't allowed on tables with immutable 
rows.


> 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