phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dumindu Buddhika (JIRA)" <>
Subject [jira] [Commented] (PHOENIX-1705) implement ARRAY_APPEND built in function
Date Sun, 08 Mar 2015 06:16:39 GMT


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,

	at org.apache.phoenix.schema.types.PArrayDataType.createPhoenixArray(
	at org.apache.phoenix.schema.types.PArrayDataType.toObject(
	at org.apache.phoenix.schema.types.PBinaryArray.toObject(
	at org.apache.phoenix.schema.types.PDataType.toObject(
	at org.apache.phoenix.compile.ExpressionProjector.getValue(
	at org.apache.phoenix.jdbc.PhoenixResultSet.getArray(
	at org.apache.phoenix.end2end.salted.ArrayAppendFunctionIT.testArray(

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. 


> implement ARRAY_APPEND built in function
> ----------------------------------------
>                 Key: PHOENIX-1705
>                 URL:
>             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

View raw message