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

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

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

    https://github.com/apache/phoenix/pull/36#discussion_r24804498
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/schema/MetaDataClient.java ---
    @@ -433,14 +433,34 @@ private boolean 
addIndexesFromPhysicalTable(MetaDataMutationResult result) throw
             for (PTable index : indexes) {
                 if (index.getViewIndexId() == null) {
                     boolean containsAllReqdCols = true;
    -                // Ensure that all indexed columns from index on physical 
table
    +                // Ensure that all columns required to create index
                     // exist in the view too (since view columns may be 
removed)
    -                List<PColumn> pkColumns = index.getPKColumns();
    -                for (int i = index.getBucketNum() == null ? 0 : 1; i < 
pkColumns.size(); i++) {
    +                IndexMaintainer indexMaintainer = 
index.getIndexMaintainer(physicalTable, connection);
    --- End diff --
    
    I used the index maintainer and physicalTable.getPKColumns()  to get the 
columns required to build the index.


> Enhance function/expression index tests
> ---------------------------------------
>
>                 Key: PHOENIX-1639
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1639
>             Project: Phoenix
>          Issue Type: Test
>            Reporter: Thomas D'Silva
>            Assignee: Thomas D'Silva
>
> Add tests for views, negative scenarios, sort order of expression. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to