[ https://issues.apache.org/jira/browse/PHOENIX-7509?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Palash Chauhan reassigned PHOENIX-7509: --------------------------------------- Assignee: Palash Chauhan > Metadata Cache should handle tables which have LAST_DDL_TIMESTAMP column null > in syscat > --------------------------------------------------------------------------------------- > > Key: PHOENIX-7509 > URL: https://issues.apache.org/jira/browse/PHOENIX-7509 > Project: Phoenix > Issue Type: Bug > Reporter: Tanuj Khurana > Assignee: Palash Chauhan > Priority: Major > > PHOENIX-6883 re-designed the Phoenix metadata cache. It relies upon the > LAST_DDL_TIMESTAMP column. However, in some scenarios where the table > pre-existed before this column was introduced and there hasn't been any DDL > change on that table this column will have a null value. If the ddl timestamp > validation is enabled, then we get a NPE when querying such tables. > In my test, I got the below NPE > {code:java} > 2025-01-16 13:50:06,084 ERROR ValidateLastDDLTimestampUtil - Error in > validating DDL timestamp for Tenant: null, {Schema: TEST, Table: N000001}, > org.apache.phoenix.exception.PhoenixIOException > at > org.apache.phoenix.util.ClientUtil.parseServerException(ClientUtil.java:70) > at > org.apache.phoenix.util.ValidateLastDDLTimestampUtil.validateLastDDLTimestamp(ValidateLastDDLTimestampUtil.java:121) > at > org.apache.phoenix.util.ValidateLastDDLTimestampUtil.validateLastDDLTimestamp(ValidateLastDDLTimestampUtil.java:130) > at > org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:390) > at > org.apache.phoenix.jdbc.PhoenixStatement$1.call(PhoenixStatement.java:352) > at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53) > at > org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:352) > at > org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:334) > at > org.apache.phoenix.jdbc.PhoenixStatement.executeQuery(PhoenixStatement.java:2295) > at > org.apache.phoenix.end2end.PhoenixStandaloneClient.testConnection(PhoenixStandaloneClient.java:25) > at > org.apache.phoenix.end2end.PhoenixStandaloneClient.main(PhoenixStandaloneClient.java:15) > Caused by: java.lang.NullPointerException > at > org.apache.phoenix.util.ValidateLastDDLTimestampUtil.getValidateDDLTimestampRequest(ValidateLastDDLTimestampUtil.java:173) > at > org.apache.phoenix.util.ValidateLastDDLTimestampUtil.validateLastDDLTimestamp(ValidateLastDDLTimestampUtil.java:118) > ... 9 more {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)