Return-Path: X-Original-To: apmail-phoenix-dev-archive@minotaur.apache.org Delivered-To: apmail-phoenix-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29E4317614 for ; Mon, 2 Nov 2015 07:43:30 +0000 (UTC) Received: (qmail 10672 invoked by uid 500); 2 Nov 2015 07:43:30 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 10609 invoked by uid 500); 2 Nov 2015 07:43:30 -0000 Mailing-List: contact dev-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list dev@phoenix.apache.org Received: (qmail 10594 invoked by uid 99); 2 Nov 2015 07:43:29 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2015 07:43:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 910A1C070B for ; Mon, 2 Nov 2015 07:43:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.77 X-Spam-Level: * X-Spam-Status: No, score=1.77 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id aaVH3zsy0mYf for ; Mon, 2 Nov 2015 07:43:28 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with SMTP id 1675123057 for ; Mon, 2 Nov 2015 07:43:28 +0000 (UTC) Received: (qmail 10581 invoked by uid 99); 2 Nov 2015 07:43:27 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Nov 2015 07:43:27 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BFAFE2C0452 for ; Mon, 2 Nov 2015 07:43:27 +0000 (UTC) Date: Mon, 2 Nov 2015 07:43:27 +0000 (UTC) From: "Dumindu Buddhika (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (PHOENIX-2301) NullPointerException when upserting into a char array column MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PHOENIX-2301?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dumindu Buddhika reassigned PHOENIX-2301: ----------------------------------------- Assignee: Dumindu Buddhika > NullPointerException when upserting into a char array column > ------------------------------------------------------------ > > Key: PHOENIX-2301 > URL: https://issues.apache.org/jira/browse/PHOENIX-2301 > Project: Phoenix > Issue Type: Bug > Affects Versions: 4.5.2 > Reporter: Julian Jaffe > Assignee: Dumindu Buddhika > > Attempting to upsert into a char array causes an NPE. Minimum example: > {code:sql} > 0: jdbc:phoenix:xxxxxx> CREATE TABLE IF NOT EXISTS TEST("testIntArray" INTEGER[], CONSTRAINT "test_pk" PRIMARY KEY("testIntArray")) DEFAULT_COLUMN_FAMILY='T'; > No rows affected (1.28 seconds) > 0: jdbc:phoenix:xxxxxx> UPSERT INTO TEST VALUES (ARRAY[1, 2, 3]); > 1 row affected (0.184 seconds) > 0: jdbc:phoenix:xxxxxx> SELECT * FROM TEST; > +------------------------------------------+ > | testIntArray | > +------------------------------------------+ > | [1, 2, 3] | > +------------------------------------------+ > 1 row selected (0.308 seconds) > 0: jdbc:phoenix:xxxxxx> DROP TABLE IF EXISTS TEST; > No rows affected (3.348 seconds) > 0: jdbc:phoenix:xxxxxx> CREATE TABLE IF NOT EXISTS TEST("testCharArray" CHAR(3)[], CONSTRAINT "test_pk" PRIMARY KEY("testCharArray")) DEFAULT_COLUMN_FAMILY='T'; > No rows affected (1.446 seconds) > 0: jdbc:phoenix:xxxxxx> UPSERT INTO TEST VALUES (ARRAY['aaa', 'bbb', 'ccc']); > java.lang.NullPointerException > at org.apache.phoenix.schema.types.PArrayDataType.createPhoenixArray(PArrayDataType.java:1123) > at org.apache.phoenix.schema.types.PArrayDataType.toObject(PArrayDataType.java:338) > at org.apache.phoenix.schema.types.PCharArray.toObject(PCharArray.java:64) > at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:967) > at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:1008) > at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:1004) > at org.apache.phoenix.util.SchemaUtil.toString(SchemaUtil.java:381) > at org.apache.phoenix.schema.PTableImpl.newKey(PTableImpl.java:572) > at org.apache.phoenix.compile.UpsertCompiler.setValues(UpsertCompiler.java:117) > at org.apache.phoenix.compile.UpsertCompiler.access$400(UpsertCompiler.java:98) > at org.apache.phoenix.compile.UpsertCompiler$3.execute(UpsertCompiler.java:821) > 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) > 0: jdbc:phoenix:xxxxxx> SELECT * FROM TEST; > +---------------+ > | testCharArray | > +---------------+ > +---------------+ > No rows selected (0.169 seconds) > 0: jdbc:phoenix:xxxxxx> SELECT "testCharArray" FROM TEST; > +---------------+ > | testCharArray | > +---------------+ > +---------------+ > No rows selected (0.182 seconds) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)