You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-dev@jackrabbit.apache.org by Davide Giannella <gi...@gmail.com> on 2014/03/25 14:43:57 UTC
Multi-value properties and order
Good morning everyone,
I'm looking into OAK-1570[0] and willing to implement the "fast lanes"
of a SkipList[1] by converting the :next[3] property into a multivalue,
where each position represent the associated lane.
(0) https://issues.apache.org/jira/browse/OAK-1570
(1) http://en.wikipedia.org/wiki/Skip_list
(3) http://goo.gl/1rzY4W
While chatting with a colleague he raised a doubt abut if the order is
kept or it could change over the time. So if I have { ":next" : [ "a",
"b", "c" ] } is it guaranteed that it will always be "abc" and not "cba"
or something else other times?
Cheers
Davide
Re: Multi-value properties and order
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Tue, Mar 25, 2014 at 10:00 AM, Alex Parvulescu
<al...@gmail.com> wrote:
> Out of curiosity, do we have any tests that verify this behavior?
The TCK has a pretty complete set of property tests that also check
for multivalued properties. See for example the
SetPropertyValueTest.testSet*Array* methods.
BR,
Jukka Zitting
Re: Multi-value properties and order
Posted by Alex Parvulescu <al...@gmail.com>.
Hi,
> While chatting with a colleague he raised a doubt abut if the order is
> kept or it could change over the time.
guilty as charged :)
Sorry about the confusion, I was thinking about the fact that the child
nodes don't have a guaranteed order, and applied the same line of thinking
for the properties too.
Thanks Jukka for clarifying!
Out of curiosity, do we have any tests that verify this behavior?
best,
alex
On Tue, Mar 25, 2014 at 2:51 PM, Jukka Zitting <ju...@gmail.com>wrote:
> Hi,
>
> On Tue, Mar 25, 2014 at 9:43 AM, Davide Giannella
> <gi...@gmail.com> wrote:
> > While chatting with a colleague he raised a doubt abut if the order is
> > kept or it could change over the time. So if I have { ":next" : [ "a",
> > "b", "c" ] } is it guaranteed that it will always be "abc" and not "cba"
> > or something else other times?
>
> The value list of a multi-valued property always keeps its order.
>
> For example, we use a multi-valued property to store the order of the
> children of an orderable node.
>
> BR,
>
> Jukka Zitting
>
Re: Multi-value properties and order
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Tue, Mar 25, 2014 at 9:43 AM, Davide Giannella
<gi...@gmail.com> wrote:
> While chatting with a colleague he raised a doubt abut if the order is
> kept or it could change over the time. So if I have { ":next" : [ "a",
> "b", "c" ] } is it guaranteed that it will always be "abc" and not "cba"
> or something else other times?
The value list of a multi-valued property always keeps its order.
For example, we use a multi-valued property to store the order of the
children of an orderable node.
BR,
Jukka Zitting