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

    https://github.com/apache/phoenix/pull/12#discussion_r17618826
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 ---
    @@ -667,12 +688,101 @@ private PTable getTable(RegionScanner scanner, long 
clientTimeStamp, long tableT
               } else {
                   addColumnToTable(results, colName, famName, colKeyValues, 
columns, saltBucketNum != null);
               }
    +        }        
    +        byte[] tenIdBytes = ByteUtil.EMPTY_BYTE_ARRAY;
    +        if (tenantId != null) {
    +            tenIdBytes = tenantId.getBytes();
             }
    -
    +        byte[] schNameInBytes = ByteUtil.EMPTY_BYTE_ARRAY;
    +        if (schemaName != null) {
    +            schNameInBytes = Bytes.toBytes(schemaName.getString());
    +        }
    +        byte[] tableKey = SchemaUtil.getTableKey(tenIdBytes, 
schNameInBytes , PhoenixDatabaseMetaData.SYSTEM_STATS_NAME_BYTES);
    +        ImmutableBytesPtr key = new ImmutableBytesPtr(tableKey);
    +        Cache<ImmutableBytesPtr, PTable> metaDataCache =
    +                GlobalCache.getInstance(this.env).getMetaDataCache();
    +        PTable statsPTable = metaDataCache.getIfPresent(key);
    --- End diff --
    
    I'm confused about this statsPTable. Why is it needed? I believe you can 
get rid of it as I don't think you're using it.


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