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

James Taylor commented on PHOENIX-128:
--------------------------------------

You can reverse the entire array (minus the footer you write for variable 
length arrays). You want the sort order to be exactly reverse of what it was 
before. Use SortOrder.invert() - there are two variations - one that allocates 
a new array and one that does it in-place. Use the latter if you allocated the 
array, but otherwise use the former. Probably best to pass SortOrder to toBytes 
so we can do the invert in-place.

> Support coercion and descending sort order for ARRAY
> ----------------------------------------------------
>
>                 Key: PHOENIX-128
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-128
>             Project: Phoenix
>          Issue Type: Bug
>            Reporter: James Taylor
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 3.0.0
>
>
> Now that our ARRAY types may be used in the primary key, we need to support 
> descending sort order (i.e. inverting the bits). There are also holes in the 
> support for coerce, as it's legitimate to coerce an array of BIGINT to an 
> array of INTEGER for example.
> This can all be handled pretty easily in the PArrayDataType.coerceBytes() 
> method.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to