Dan (or anyone else at Scale7), how are we supposed to perform range queries using Composite types?
I have a column family that has a (LexicalUUIDType: LexicalUUIDType: Long) composite comparator. I want to query all of the columns with equal UUIDs in the first component. However, there isn't much (or any) documentation on how to do this in Pelops.
I'm trying:
CompositeType.Builder compositeBuilder = CompositeType.Builder.newBuilder();
compositeBuilder.addUuid(userID1); //UUID
compositeBuilder.addBytes(Bytes.EMPTY); //start at beginning of range, I think?
Bytes rangeStartBytes = compositeBuilder.build();
Bytes rangeEndBytes = Bytes.EMPTY;
SlicePredicate blah = Selector.newColumnsPredicate(rangeStartBytes, rangeEndBytes, false, Integer.MAX_VALUE);
However, I'm not sure if this is correct. With this code, am I querying all the columns with "userID1" as the first component, or am i querying all columns appearing below that specified by rangeStartBytes (regardless of the first component)?
Furthermore, what exactly does Bytes.EMPTY signify? The beginning of a range? The end of a range? Both? And what does Bytes.NULL signify? I looked in to the source and it seems as though they're being created from byte arrays of 0 and respectively, but I'm not sure what those values signify when it comes to queries.
If any of you guys at Scale7 could lend me some wisdom, I'd appreciate it