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

    https://github.com/apache/phoenix/pull/261#discussion_r123493994
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
 ---
    @@ -1420,7 +1420,7 @@ public MetaDataMutationResult createTable(final 
List<Mutation> tableMetaData, fi
             byte[] tenantIdBytes = 
rowKeyMetadata[PhoenixDatabaseMetaData.TENANT_ID_INDEX];
             byte[] schemaBytes = 
rowKeyMetadata[PhoenixDatabaseMetaData.SCHEMA_NAME_INDEX];
             byte[] tableBytes = 
rowKeyMetadata[PhoenixDatabaseMetaData.TABLE_NAME_INDEX];
    -        byte[] tableName = physicalTableName != null ? physicalTableName : 
SchemaUtil.getTableNameAsBytes(schemaBytes, tableBytes);
    +        byte[] tableName = SchemaUtil.getTableNameAsBytes(schemaBytes, 
tableBytes);
    --- End diff --
    
    I think this is correct because this variable is used as the first argument 
of ensureTableCreated method and it doesn't expect a physical table name but a 
phoenix table name.
    Also,  this variable is used by the following code but it expects a phoenix 
table name as well.
    
    ```
                ensureViewIndexTableCreated(
                        SchemaUtil.getPhysicalHBaseTableName(tableName, 
isNamespaceMapped, tableType).getBytes(),
                        tableProps, familiesPlusDefault, 
MetaDataUtil.isSalted(m, kvBuilder, ptr) ? splits : null,
                                MetaDataUtil.getClientTimeStamp(m), 
isNamespaceMapped);
    ```



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to