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

    https://github.com/apache/phoenix/pull/334#discussion_r212805302
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java 
---
    @@ -436,16 +455,18 @@ public static MetaDataResponse 
toProto(MetaDataMutationResult result) {
                     
sharedTableStateBuilder.setSchemaName(ByteStringer.wrap(sharedTableState.getSchemaName().getBytes()));
                     
sharedTableStateBuilder.setTableName(ByteStringer.wrap(sharedTableState.getTableName().getBytes()));
                     
sharedTableStateBuilder.setViewIndexId(sharedTableState.getViewIndexId());
    +                
sharedTableStateBuilder.setViewIndexType(sharedTableState.viewIndexType.getSqlType());
                     
builder.addSharedTablesToDelete(sharedTableStateBuilder.build());
                   }
                 }
                 if (result.getSchema() != null) {
                   builder.setSchema(PSchema.toProto(result.schema));
                 }
                 builder.setAutoPartitionNum(result.getAutoPartitionNum());
    -                if (result.getViewIndexId() != null) {
    -                    builder.setViewIndexId(result.getViewIndexId());
    -                }
    +            if (result.getViewIndexId() != null) {
    +                builder.setViewIndexId(result.getViewIndexId());
    +                
builder.setViewIndexType(result.getViewIndexType().getSqlType());
    --- End diff --
    
    Can you add a null check for result.getViewIndexType()?


---

Reply via email to