Compound Set Algebra Operations #980

Closed
clord opened this Issue Feb 28, 2013 · 0 comments

Comments

Projects
None yet
2 participants

clord commented Feb 28, 2013

A generic mechanism for set algebra would save a lot of bandwidth. I propose something of the form (if not the keywords, the C affix means 'compound' but not attached to that at all):

SINTERC keyA [keysA ...] DIFF keyB [keysB ...]

The command intersects all of keyA, and subtracts any result that occurs in keyB out of the result before sending it to the client.

This saves bandwidth when the SDIFF portion consists of large sets that should not be transferred over the wire for a local set-difference operation.

This pattern can be extended to support other set algebra operations, e.g.:

SINTERC key [keys ...] UNION key [keys ...]
UNIONC key [keys ...] INTER key [keys ...]
DIFFC key [keys ...] INTER key [keys ...]

And if possible, it would be really nice to be able to make chains of different operations:

SINTERC keyA keyB DIFF keyD INTER keyI UNION keyU

@badboy badboy closed this Jul 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment