|
28 | 28 | import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP; |
29 | 29 | import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_15_0; |
30 | 30 | import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_4_16_0; |
31 | | -import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0; |
| 31 | +import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0; |
32 | 32 | import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.PHOENIX_MAJOR_VERSION; |
33 | 33 | import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.PHOENIX_MINOR_VERSION; |
34 | 34 | import static org.apache.phoenix.coprocessorclient.MetaDataProtocol.PHOENIX_PATCH_NUMBER; |
@@ -4741,44 +4741,41 @@ protected PhoenixConnection upgradeSystemCatalogIfRequired(PhoenixConnection met |
4741 | 4741 | } |
4742 | 4742 | } |
4743 | 4743 | } |
4744 | | - if (currentServerSideTableTimeStamp < MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0) { |
| 4744 | + if (currentServerSideTableTimeStamp < MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0) { |
4745 | 4745 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4746 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 8, |
| 4746 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 9, |
4747 | 4747 | PhoenixDatabaseMetaData.PHYSICAL_TABLE_NAME + " " + PVarchar.INSTANCE.getSqlTypeName()); |
4748 | 4748 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4749 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 7, |
| 4749 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 8, |
4750 | 4750 | PhoenixDatabaseMetaData.SCHEMA_VERSION + " " + PVarchar.INSTANCE.getSqlTypeName()); |
4751 | 4751 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4752 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 6, |
| 4752 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 7, |
4753 | 4753 | PhoenixDatabaseMetaData.EXTERNAL_SCHEMA_ID + " " + PVarchar.INSTANCE.getSqlTypeName()); |
4754 | 4754 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4755 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 5, |
| 4755 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 6, |
4756 | 4756 | PhoenixDatabaseMetaData.STREAMING_TOPIC_NAME + " " + PVarchar.INSTANCE.getSqlTypeName()); |
4757 | 4757 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4758 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 4, |
| 4758 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 5, |
4759 | 4759 | PhoenixDatabaseMetaData.INDEX_WHERE + " " + PVarchar.INSTANCE.getSqlTypeName()); |
4760 | 4760 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4761 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 3, |
| 4761 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 4, |
4762 | 4762 | PhoenixDatabaseMetaData.CDC_INCLUDE_TABLE + " " + PVarchar.INSTANCE.getSqlTypeName()); |
4763 | 4763 |
|
4764 | 4764 | /** |
4765 | 4765 | * TODO: Provide a path to copy existing data from PHOENIX_TTL to TTL column and then to DROP |
4766 | 4766 | * PHOENIX_TTL Column. See PHOENIX-7023 |
4767 | 4767 | */ |
4768 | 4768 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4769 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 2, |
| 4769 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 3, |
4770 | 4770 | PhoenixDatabaseMetaData.TTL + " " + PVarchar.INSTANCE.getSqlTypeName()); |
4771 | 4771 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4772 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0 - 1, |
| 4772 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 2, |
4773 | 4773 | PhoenixDatabaseMetaData.ROW_KEY_MATCHER + " " + PVarbinary.INSTANCE.getSqlTypeName()); |
4774 | 4774 | metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, |
4775 | | - MIN_SYSTEM_TABLE_TIMESTAMP_5_3_0, |
| 4775 | + MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 1, |
4776 | 4776 | PhoenixDatabaseMetaData.IS_STRICT_TTL + " " + PBoolean.INSTANCE.getSqlTypeName()); |
4777 | | - // Values in PHOENIX_TTL column will not be used for further release as PHOENIX_TTL column is |
4778 | | - // being deprecated |
4779 | | - // and will be removed in later release. To copy copyDataFromPhoenixTTLtoTTL(metaConnection) |
4780 | | - // can be used but |
4781 | | - // as that feature was not fully built we are not moving old value to new column |
| 4777 | + // Add any 5.4.0 specific upgrade logic here if needed in the future |
| 4778 | + // Currently no new schema changes required for 5.4.0 |
4782 | 4779 |
|
4783 | 4780 | // move TTL values stored in descriptor to SYSCAT TTL column. |
4784 | 4781 | moveTTLFromHBaseLevelTTLToPhoenixLevelTTL(metaConnection); |
|
0 commit comments