[
https://issues.apache.org/jira/browse/CASSANDRA-764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835000#action_12835000
]
Ted Zlatanov edited comment on CASSANDRA-764 at 2/17/10 9:24 PM:
-----------------------------------------------------------------
>01: still adds TODO about method not being used, that is
>use Collections.emptyList
>use reference == null
>>> hasFullPredicate
>don't make a method for something trivial. and isn't this backwards, i.e.,
>shouldn't it return true if bitmasks is NOT null?
Fixed, thanks. Also rebased using git-svn now and consolidated into a single
patch.
>>> int limit = Math.min(bitmask.length, name.length)
>ISTM that the semantics for a bitmask predicate against a value of a different
>length are unclear. Let's stick to only matching values of the same length.
I think it makes sense to have shorter bitmasks that are assumed to extend into
infinity as all true. That would save bandwidth in some cases, but you're
right that semantically this is unclear. Maybe it can be enabled with an
option. Anyhow, it returns false now but I can make it throw an exception
instead.
>>> for (int i=0; i < bitmasks.size(); i++)
>use a foreach loop
I need the offset to assign the result. Or would you rather I use
Collections2.transform()?
>>> PredicateUtils
>prefer google collections to apache commons unless the former does not support
>what you need (here you want Predicates.or)
Sorry, I didn't know that. Thanks for letting me know. I like the Google
collections better anyhow :)
This patch passes all the tests, including the new TableTest ones that exercise
bitmask matching.
Please note the TableTest.assertColumns() changes. I think they are an
improvement but am OK with making them for bitmasks only. The problem is that
assertColumns() will print the toString() version of the column which doesn't
contain the name so it's a bit confusing.
was (Author: tzz):
>01: still adds TODO about method not being used, that is
>use Collections.emptyList
>use reference == null
>>> hasFullPredicate
>don't make a method for something trivial. and isn't this backwards, i.e.,
>shouldn't it return true if bitmasks is NOT null?
Fixed, thanks. Also rebased using svn-git now and consolidated into a single
patch.
>>> int limit = Math.min(bitmask.length, name.length)
>ISTM that the semantics for a bitmask predicate against a value of a different
>length are unclear. Let's stick to only matching values of the same length.
I think it makes sense to have shorter bitmasks that are assumed to extend into
infinity as all true. That would save bandwidth in some cases, but you're
right that semantically this is unclear. Maybe it can be enabled with an
option. Anyhow, it returns false now but I can make it throw an exception
instead.
>>> for (int i=0; i < bitmasks.size(); i++)
>use a foreach loop
I need the offset to assign the result. Or would you rather I use
Collections2.transform()?
>>> PredicateUtils
>prefer google collections to apache commons unless the former does not support
>what you need (here you want Predicates.or)
Sorry, I didn't know that. Thanks for letting me know. I like the Google
collections better anyhow :)
This patch passes all the tests, including the new TableTest ones that exercise
bitmask matching.
Please note the TableTest.assertColumns() changes. I think they are an
improvement but am OK with making them for bitmasks only. The problem is that
assertColumns() will print the toString() version of the column which doesn't
contain the name so it's a bit confusing.
> bitmasks applied to SliceRange
> ------------------------------
>
> Key: CASSANDRA-764
> URL: https://issues.apache.org/jira/browse/CASSANDRA-764
> Project: Cassandra
> Issue Type: New Feature
> Components: Core
> Reporter: Ted Zlatanov
> Assignee: Ted Zlatanov
> Priority: Minor
> Attachments: 001-CASSANDRA-754-bitmasks.patch
>
>
> Add bitmasks (OR of an array of ANDs) to the SliceRange. Make them optional.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.