phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Jaffe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PHOENIX-2402) NPE when using UPSERT SELECT with a char array
Date Wed, 11 Nov 2015 19:41:11 GMT

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

Julian Jaffe commented on PHOENIX-2402:
---------------------------------------

Patch uploaded

> NPE when using UPSERT SELECT with a char array
> ----------------------------------------------
>
>                 Key: PHOENIX-2402
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-2402
>             Project: Phoenix
>          Issue Type: Bug
>    Affects Versions: 4.5.2
>            Reporter: Julian Jaffe
>         Attachments: PHOENIX-2402.patch
>
>
> A NPE is thrown when attempting to UPSERT SELECT with a char array:
> {code:sql}
> CREATE TABLE IF NOT EXISTS TEST.TEST("testInt" INTEGER, "testCharArray" CHAR(3)[] CONSTRAINT
"test_test" PRIMARY KEY ("testInt")) DEFAULT_COLUMN_FAMILY='TT', SALT_BUCKETS=10;
> No rows affected (1.631 seconds)
> 0: jdbc:phoenix:xxxxxx> UPSERT INTO TEST.TEST VALUES(5, ARRAY['aaa','bbb']);
> 1 row affected (0.164 seconds)
> 0: jdbc:phoenix:xxxxxx> SELECT * FROM TEST.TEST;
> +------------------------------------------+---------------+
> |                 testInt                  | testCharArray |
> +------------------------------------------+---------------+
> | 5                                        | ['aaa', 'bbb'] |
> +------------------------------------------+---------------+
> 1 row selected (0.364 seconds)
> 0: jdbc:phoenix:xxxxxx> UPSERT INTO TEST.TEST("testInt", "testCharArray") SELECT "testInt",
ARRAY['ccc'] FROM TEST.TEST WHERE "testInt" = 5;
> Error: java.lang.NullPointerException (state=08000,code=101)
> org.apache.phoenix.exception.PhoenixIOException: java.lang.NullPointerException
>     at org.apache.phoenix.util.ServerUtil.parseServerException(ServerUtil.java:108)
>     at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:553)
>     at org.apache.phoenix.iterate.RoundRobinResultIterator.getIterators(RoundRobinResultIterator.java:176)
>     at org.apache.phoenix.iterate.RoundRobinResultIterator.next(RoundRobinResultIterator.java:91)
>     at org.apache.phoenix.compile.UpsertCompiler$2.execute(UpsertCompiler.java:685)
>     at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:319)
>     at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:311)
>     at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
>     at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:309)
>     at org.apache.phoenix.jdbc.PhoenixStatement.execute(PhoenixStatement.java:1432)
>     at sqlline.Commands.execute(Commands.java:822)
>     at sqlline.Commands.sql(Commands.java:732)
>     at sqlline.SqlLine.dispatch(SqlLine.java:808)
>     at sqlline.SqlLine.begin(SqlLine.java:681)
>     at sqlline.SqlLine.start(SqlLine.java:398)
>     at sqlline.SqlLine.main(SqlLine.java:292)
> Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
>     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
>     at java.util.concurrent.FutureTask.get(FutureTask.java:206)
>     at org.apache.phoenix.iterate.BaseResultIterators.getIterators(BaseResultIterators.java:549)
>     ... 14 more
> Caused by: java.lang.NullPointerException
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message