[
https://issues.apache.org/jira/browse/PHOENIX-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dumindu Buddhika updated PHOENIX-1705:
--------------------------------------
Attachment: PHOENIX-1705_implement_ARRAY_APPEND_built_in_function13.patch
Here is the updated patch.
Thanks for the review [~ram_krish]. Sorry for using wrong name earlier for
mentioning.
{quote}
{code}Arrays.fill(newArray, newElementPosition + elementLength,
newOffsetArrayPosition,
QueryConstants.SEPARATOR_BYTE);{code}
Should we do this above. Why to fill? Incase of a bigger array like in test
case testArrayAppendFunction4() you will fill it unnecessarily right?
{quote}
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.
{quote}
The change to Wherecompiler where the pad() is changed - do we have test case
for that here?
{quote}
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 addressed the other comments(removed redundant variable, created private
method, shrinked two loops to one) including James's suggestion with this patch.
> 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)