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

    https://github.com/apache/phoenix/pull/147#discussion_r50284550
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/phoenix/util/UpgradeUtil.java ---
    @@ -1215,4 +1218,67 @@ public static void 
addRowKeyOrderOptimizableCell(List<Mutation> tableMetadata, b
                     MetaDataEndpointImpl.ROW_KEY_ORDER_OPTIMIZABLE_BYTES, 
PBoolean.INSTANCE.toBytes(true));
             tableMetadata.add(put);
         }
    +
    +    public static boolean truncateStats(HTableInterface metaTable, 
HTableInterface statsTable)
    +            throws IOException, InterruptedException {
    +        List<Cell> columnCells = metaTable
    +                .get(new Get(SchemaUtil.getTableKey(null, 
PhoenixDatabaseMetaData.SYSTEM_SCHEMA_NAME,
    +                        PhoenixDatabaseMetaData.SYSTEM_CATALOG_TABLE)))
    +                
.getColumnCells(PhoenixDatabaseMetaData.TABLE_FAMILY_BYTES, 
QueryConstants.EMPTY_COLUMN_BYTES);
    +        if (!columnCells.isEmpty()
    +                && columnCells.get(0).getTimestamp() < 
MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_7_0) {
    --- End diff --
    
    Actually, I take it back. Your way is better.


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