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.


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