You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Sergey Soldatov (JIRA)" <ji...@apache.org> on 2018/05/09 21:03:00 UTC

[jira] [Commented] (PHOENIX-4733) NPE while running sql through file using psql

    [ https://issues.apache.org/jira/browse/PHOENIX-4733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16469491#comment-16469491 ] 

Sergey Soldatov commented on PHOENIX-4733:
------------------------------------------

LGTM +1

> NPE while running sql through file using psql
> ---------------------------------------------
>
>                 Key: PHOENIX-4733
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-4733
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.14.0, 5.0.0
>            Reporter: Srikanth Janardhan
>            Assignee: Ankit Singhal
>            Priority: Major
>             Fix For: 4.14.0, 5.0.0
>
>         Attachments: PHOENIX-4733.patch
>
>
> {code:java}
> cat /tmp/test.sql
> CREATE TABLE IF NOT EXISTS QETEST (ID INTEGER NOT NULL PRIMARY KEY, A VARCHAR, B INTEGER);
> upsert into QETEST VALUES(1,'A',10);
> upsert into QETEST VALUES(2,'B',1000);
> upsert into QETEST VALUES(3,'A',20);
> upsert into QETEST VALUES(4,'A',100);
> upsert into QETEST VALUES(5,'B',9000);
> SELECT A||'_GROUP' AS GRP,SUM(B)||'_RESULT' AS SUM FROM QETEST GROUP BY A;
> DROP TABLE QETEST;{code}
> bin/psql.py localhost /tmp/test.sql
> {code:java}
> no rows upserted
> Time: 0.858 sec(s)
> 1 row upserted
> Time: 0.04 sec(s)
> 1 row upserted
> Time: 0.004 sec(s)
> 1 row upserted
> Time: 0.006 sec(s)
> 1 row upserted
> Time: 0.004 sec(s)
> 1 row upserted
> Time: 0.004 sec(s)
> java.lang.NullPointerException: null value in entry: QUERY_I=null
> at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:235)
> at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:144)
> at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:182)
> at org.apache.phoenix.log.QueryLoggerUtil.getInitialDetails(QueryLoggerUtil.java:50)
> at org.apache.phoenix.log.QueryLoggerUtil.logInitialDetails(QueryLoggerUtil.java:36)
> at org.apache.phoenix.jdbc.PhoenixStatement.createQueryLogger(PhoenixStatement.java:1783)
> at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:176)
> at org.apache.phoenix.jdbc.PhoenixPreparedStatement.execute(PhoenixPreparedStatement.java:183)
> at org.apache.phoenix.jdbc.PhoenixConnection.executeStatements(PhoenixConnection.java:468)
> at org.apache.phoenix.util.PhoenixRuntime.executeStatements(PhoenixRuntime.java:348)
> at org.apache.phoenix.util.PhoenixRuntime.main(PhoenixRuntime.java:295){code}
> FYI [~jamestaylor] , if you see it a blocker for 4.14.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)