Getting started on core development

32 views
Skip to first unread message

Shannon Weyrick

unread,
Jan 19, 2012, 10:10:16 PM1/19/12
to mongodb-dev
Hi everyone, I'm interested in exploring the core server and I'd like
to work on an entry level issue. I have no particular itch to scratch,
so I've picked SERVER-3518: "Bitwise query operators" as a starting
point to get my feet wet. If any devs have a better suggestion, I'm
open to it.

First question is syntax: can/should this use the existing $bit, as an
operator? Should there be new operators ($bitAnd, $bitOr?), or should
$and, $or be adapted to support bitwise?

Any other comments on implementation (or suggestions for an
alternative issue), would be appreciated.

Thanks!
Shannon

Eliot Horowitz

unread,
Jan 26, 2012, 1:50:59 AM1/26/12
to mongo...@googlegroups.com
Probably $bitAnd and $bitOr
Lots of little caveats on this though.
Especially with query optimizer, etc...

> --
> You received this message because you are subscribed to the Google Groups "mongodb-dev" group.
> To post to this group, send email to mongo...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-dev?hl=en.
>

Shannon Weyrick

unread,
Jan 26, 2012, 5:09:46 PM1/26/12
to mongo...@googlegroups.com
Thanks Eliot. I've got a (probably naive) implementation done at
https://github.com/weyrick/mongo/compare/server-3518

Can you elaborate or point me in the direction of where to investigate
the caveats? If they are similar to an existing operator, I could
examine that.

Shannon

Dwight Merriman

unread,
Jan 26, 2012, 5:14:59 PM1/26/12
to mongo...@googlegroups.com
i think he mainly means how should the query optimizer handle it intelligently (if there are cases for which that is relevant)

also we should look with any new operator at if there are any nuances or nice things that make sense with the aggregation framework - could be it's orthogonal but i don't know without thinking about it a little

Dwight Merriman

unread,
Jan 26, 2012, 5:18:19 PM1/26/12
to mongo...@googlegroups.com
and how does it align with any $ names of operators in updates.  even if different n eeds to be a predictable pattern to it all.  $bit there is legacy and perhaps not the right way to go.

any new $operator added will be there for decades so have to be a little 
careful

Shannon Weyrick

unread,
Jan 26, 2012, 9:04:57 PM1/26/12
to mongo...@googlegroups.com
Yes, I agree it should be consistent. From what I can tell, $bitand,
$bitor and $bit are all defined as update modifier ops. Note that
$bitand and $bitor are spelled all lowercase in update, and I'm not
sure they are actually used.

With that in mind, perhaps $bit in the query would be more consistent
and flexible, at the expense of a little more verbosity in the syntax
(vs. bitAnd, bitOr). Derick on #mongodb mentioned that he was working
on adding a few more bit operations to the $bit update modifier, as
well.

https://github.com/derickr/mongo/compare/bitwise-ops

Reply all
Reply to author
Forward
0 new messages