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 499FB17711 for ; Sun, 8 Mar 2015 06:17:01 +0000 (UTC) Received: (qmail 77214 invoked by uid 500); 8 Mar 2015 06:17:01 -0000 Delivered-To: apmail-phoenix-dev-archive@phoenix.apache.org Received: (qmail 77157 invoked by uid 500); 8 Mar 2015 06:17:01 -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 77145 invoked by uid 99); 8 Mar 2015 06:17:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2015 06:17:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 08 Mar 2015 06:17:00 +0000 Received: (qmail 77107 invoked by uid 99); 8 Mar 2015 06:16:40 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 08 Mar 2015 06:16:40 +0000 Date: Sun, 8 Mar 2015 06:16:39 +0000 (UTC) From: "Dumindu Buddhika (JIRA)" To: dev@phoenix.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PHOENIX-1705) implement ARRAY_APPEND built in function MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/PHOENIX-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14351934#comment-14351934 ] Dumindu Buddhika commented on PHOENIX-1705: ------------------------------------------- Hi [~jamestaylor], I have implemented a built in function for ARRAY_APPEND it is only intended for fixed length arrays for now. But I have got a problem. I wrote a simple test for the function created. its all in the patch file. but when I run the test I get an exception, but I cant seem to find the direct reason for this exception. Can you take a look at the code segment and tell me what you think? I must be doing something wrong(may be while appending the element to array). the exception is, java.lang.NullPointerException at org.apache.phoenix.schema.types.PArrayDataType.createPhoenixArray(PArrayDataType.java:624) at org.apache.phoenix.schema.types.PArrayDataType.toObject(PArrayDataType.java:263) at org.apache.phoenix.schema.types.PBinaryArray.toObject(PBinaryArray.java:67) at org.apache.phoenix.schema.types.PDataType.toObject(PDataType.java:996) at org.apache.phoenix.compile.ExpressionProjector.getValue(ExpressionProjector.java:75) at org.apache.phoenix.jdbc.PhoenixResultSet.getArray(PhoenixResultSet.java:182) at org.apache.phoenix.end2end.salted.ArrayAppendFunctionIT.testArray(ArrayAppendFunctionIT.java:57) Here ArrrayAppendFunctionIT is the simple test case I wrote. What I understood after looking for a while is this exception occurs since PArrayDataType.toObject method does not receive array type correctly So when it calls getByteSize of data type object it gets null. Regards, Dumindu. > implement ARRAY_APPEND built in function > ---------------------------------------- > > Key: PHOENIX-1705 > URL: https://issues.apache.org/jira/browse/PHOENIX-1705 > Project: Phoenix > Issue Type: Sub-task > Reporter: Dumindu Buddhika > Assignee: Dumindu Buddhika > Attachments: PHOENIX-1705_implement_ARRAY_APPEND_built_in_function.patch > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)