[
https://issues.apache.org/jira/browse/PHOENIX-4864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16592172#comment-16592172
]
ASF GitHub Bot commented on PHOENIX-4864:
-----------------------------------------
Github user karanmehta93 commented on a diff in the pull request:
https://github.com/apache/phoenix/pull/336#discussion_r212757022
--- Diff:
phoenix-core/src/main/java/org/apache/phoenix/jdbc/LoggingPhoenixPreparedStatement.java
---
@@ -45,7 +45,9 @@ public ResultSet executeQuery() throws SQLException {
@Override
public ResultSet getResultSet() throws SQLException {
- return new LoggingPhoenixResultSet(super.getResultSet(),
phoenixMetricsLog, sql);
+ ResultSet resultSet = super.getResultSet();
--- End diff --
nit: add a comment that call to `getResultSet()` is not idempotent. Hence
we cache and return accordingly.
> Fix NullPointerException while Logging some DDL Statements
> ----------------------------------------------------------
>
> Key: PHOENIX-4864
> URL: https://issues.apache.org/jira/browse/PHOENIX-4864
> Project: Phoenix
> Issue Type: Bug
> Reporter: Ashutosh Parekh
> Priority: Minor
>
> We encounter a NullPointerException when ResultSet is null when some type of
> DDL queries are executed. The following error is encountered.
> java.lang.NullPointerException: null
> at
> org.apache.phoenix.jdbc.LoggingPhoenixResultSet.close(LoggingPhoenixResultSet.java:40)
> at
> org.apache.calcite.avatica.jdbc.JdbcMeta$StatementExpiryHandler.onRemoval(JdbcMeta.java:1105)
> at
> com.google.common.cache.LocalCache.processPendingNotifications(LocalCache.java:1963)
> ...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)