dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Support ZUNION command

Open romange opened this issue 3 years ago • 7 comments

See https://redis.io/commands/zunion for more details.

For external contributors: we will also accept the basic functionality without supporting of optional arguments.

romange avatar Oct 05 '22 17:10 romange

I can have a look into this

ATM-SALEH avatar Oct 06 '22 14:10 ATM-SALEH

@romange Hi, I'm new here, a graduate student interested in DF! I have seen the primary codes for zset related commands, and trying to implement the function. One question I met is that zunionstore is implemented by read->union->temporary map result->add to destkey such procedure. But Union does not require the last step, and we can send results back to the client after we got the intermediate result. So what kind of method is wanted by community? I'd like to propose two plans:

  • Implement a function like ToObject or ToScoredArray, which enable df to transform ScoredMap to ScoredArray and just call OutputScoredArrayResult.
  • Implement a function like OutputScoredMapResult, which requires allocating a ScoredArray in this function to get a sorted result.

Thanks for reading this

matchyc avatar Oct 13 '22 02:10 matchyc

@matchyc - I started working on this feature. However, happy as well if you take over

ATM-SALEH avatar Oct 13 '22 05:10 ATM-SALEH

Hi @ATM-SALEH since you already started I think it makes sense that you continue... There are enough tasks for everyone :)

romange avatar Oct 13 '22 05:10 romange

@matchyc - I started working on this feature. However, happy as well if you take over

Just go on!

matchyc avatar Oct 13 '22 06:10 matchyc

hey @ATM-SALEH are you still working on it?

romange avatar Oct 19 '22 17:10 romange

Yes - I started working on it. However, couldn't manage time to allocate this week. Hoping to wrap this up this weekend

ATM-SALEH avatar Oct 19 '22 19:10 ATM-SALEH

Fixed by #717

romange avatar Feb 20 '23 18:02 romange