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

    https://github.com/apache/phoenix/pull/329#discussion_r211435859
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 ---
    @@ -3207,17 +3226,37 @@ public MetaDataMutationResult updateMutation(PTable 
table, byte[][] rowKeyMetaDa
                         } 
                         if (type == PTableType.VIEW
                                 && 
EncodedColumnsUtil.usesEncodedColumnNames(table)) {
    -                        /*
    -                         * When adding a column to a view that uses 
encoded column name scheme, we
    -                         * need to modify the CQ counters stored in the 
view's physical table. So to
    -                         * make sure clients get the latest PTable, we 
need to invalidate the cache
    -                         * entry.
    -                         */
    -                        invalidateList.add(new 
ImmutableBytesPtr(MetaDataUtil
    -                                .getPhysicalTableRowForView(table)));
    -
    -
    -
    +                                /*
    +                                 * When adding a column to a view that 
uses encoded column name
    +                                 * scheme, we need to modify the CQ 
counters stored in the view's
    +                                 * physical table. So to make sure clients 
get the latest PTable, we
    +                                 * need to invalidate the cache entry.
    +                                 */
    +                                invalidateList.add(new ImmutableBytesPtr(
    +                                        
MetaDataUtil.getPhysicalTableRowForView(table)));
    +                                byte[] parentSchemaName =
    +                                        
SchemaUtil.getSchemaNameFromFullName(
    +                                            
table.getPhysicalName().getString()).getBytes();
    +                                byte[] parentTableName =
    --- End diff --
    
    done, I should have used the parent table instead of the view table here


---

Reply via email to