[ 
https://issues.apache.org/jira/browse/PHOENIX-7723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Istvan Toth updated PHOENIX-7723:
---------------------------------
    Description: 
We have a lot of statements like 
{code:java}
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
        MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 8,
        PhoenixDatabaseMetaData.SCHEMA_VERSION + " " + 
PVarchar.INSTANCE.getSqlTypeName());{code}
in 
[ConnectionQueryServicesImpl.java|https://github.com/apache/phoenix/pull/2303/files#diff-ccfa52b4c1c783877fade96f82548d5feec1a2993c0c4d2c423c6fc8f199e60d]
 

This is both fragile and hard to decipher.

Replace the subtractions with the actual version constants.

  was:
We have a lot of statements like 
{code:java}
addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
        MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 8,
        PhoenixDatabaseMetaData.SCHEMA_VERSION + " " + 
PVarchar.INSTANCE.getSqlTypeName());{code}
in 
[ConnectionQueryServicesImpl.java|https://github.com/apache/phoenix/pull/2303/files#diff-ccfa52b4c1c783877fade96f82548d5feec1a2993c0c4d2c423c6fc8f199e60d]
 

This is both fragile and hard to deipher.

Replace the subtractions with the actual version constants.


> Replace relative table version timestamps in upgrade code
> ---------------------------------------------------------
>
>                 Key: PHOENIX-7723
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-7723
>             Project: Phoenix
>          Issue Type: Improvement
>            Reporter: Istvan Toth
>            Priority: Minor
>              Labels: beginner-friendly
>
> We have a lot of statements like 
> {code:java}
> addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG,
>         MIN_SYSTEM_TABLE_TIMESTAMP_5_4_0 - 8,
>         PhoenixDatabaseMetaData.SCHEMA_VERSION + " " + 
> PVarchar.INSTANCE.getSqlTypeName());{code}
> in 
> [ConnectionQueryServicesImpl.java|https://github.com/apache/phoenix/pull/2303/files#diff-ccfa52b4c1c783877fade96f82548d5feec1a2993c0c4d2c423c6fc8f199e60d]
>  
> This is both fragile and hard to decipher.
> Replace the subtractions with the actual version constants.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to