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

ramkrishna.s.vasudevan commented on PHOENIX-1705:
-------------------------------------------------

Just add this test case. Hope it is not there for the null case.
{code}
        Object[] o = new Object[]{"1   ", "2   ", "3   ", "4   "};
        Object[] o2 = new Object[]{"1", "2", "3", "4"};
        Object element = null;;
        PDataType baseType = PChar.INSTANCE;

        PhoenixArray arr = new PhoenixArray(baseType, o);
        PhoenixArray expected = new PhoenixArray(baseType, o2);
        test(arr, element, PDataType.fromTypeId(baseType.getSqlType() + 
PDataType.ARRAY_TYPE_BASE), 4, null, baseType, 1, null, expected, 
SortOrder.ASC, SortOrder.DESC);
{code}
bq.Since WhereOptimizerTest.java contains a test for char padding. Do we need 
to have a test case here also? (Since the change is passing 
SortOrder.getDefault() to method pad).
I thought it was affecting one of the test cases here directly.
bq.Here newOffsetArrayPosition - (newElementPosition + elementLength) is always 
3. so this will always copy only 3 separator bytes. This is used to put 
separator bytes to the end of the new array.
Oh ya, right.  But may be we need not have that 'fill' itself as any way the 
byte[] is already have '0' filled in it?  What you say. Not a big deal anyway. 

Rest looks fine to me.  [~giacomotay...@gmail.com] - You for commit?

> 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, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function1.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function10.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function11.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function12.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function13.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function2.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function3.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function4.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function5.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function6.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function7.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function8.patch, 
> PHOENIX-1705_implement_ARRAY_APPEND_built_in_function9.patch
>
>




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

Reply via email to