phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheyenne Forbes <cheyenne.osanu.for...@gmail.com>
Subject Re: Delete from Array
Date Wed, 07 Jun 2017 00:54:10 GMT
I know, I was asking if I made a UDF to accept the array and remove the
element the return the new one in a UPSERT if it would work

Regards,
Cheyenne


On Tue, Jun 6, 2017 at 7:32 PM, James Taylor <jamestaylor@apache.org> wrote:

> There's no array_reduce built-in function that I'm aware of, so no.
>
> On Tue, Jun 6, 2017 at 5:27 PM, Cheyenne Forbes <
> cheyenne.osanu.forbes@gmail.com> wrote:
>
>> Can i do
>>
>> *UPSERT(id, myArray) VALUES (1, array_reduce(myArray, "index", 3))*
>> the second argument would be either "index" or "value" (what to delete
>> by) and the last would be the index or value to delete
>>
>> Regards,
>> Cheyenne
>>
>> On Tue, Jun 6, 2017 at 6:17 PM, James Taylor <jamestaylor@apache.org>
>> wrote:
>>
>>> Please feel free to file a JIRA. Though you can delete an element by
>>> using Java code, it'd be nice to have a built-in function to do the same.
>>> Functions like ARRAY_REMOVE_ELEM, ARRAY_SUB_ARRAY would be useful.
>>> Contributions are of course much appreciated.
>>>
>>> Thanks,
>>> James
>>>
>>>
>>> On Tue, Jun 6, 2017 at 3:16 PM, Sergey Soldatov <
>>> sergeysoldatov@gmail.com> wrote:
>>>
>>>> From the Apache Phoenix documentation:
>>>>
>>>>
>>>>    - Partial update of an array is currently not possible. Instead,
>>>>    the array may be manipulated on the client-side and then upserted back
in
>>>>    its entirety.
>>>>
>>>> Thanks,
>>>> Sergey
>>>>
>>>> On Mon, Jun 5, 2017 at 7:25 PM, Cheyenne Forbes <
>>>> cheyenne.osanu.forbes@gmail.com> wrote:
>>>>
>>>>> Can I delete elements from Phoenix arrays?
>>>>>
>>>>> Regards,
>>>>>
>>>>> Cheyenne O. Forbes
>>>>>
>>>>
>>>>
>>>
>>
>

Mime
View raw message