Commit graph

33 commits

Author SHA1 Message Date
Daniel Shimon
cb80b3fd1f
feat: implement ZINTERCARD (#1197)
* fix: ZINTERSTORE bug

When a shard only contains the dest key, it returned an empty map which causes the resulting intersection to be empty

* chore(vscode): Add gdb launch setting

* feat: Implement ZINTERCARD

Initial implementation without LIMIT

* feat: Implement limit for ZINTERCARD

* feat: Handle sets in ZINTER* commands
2023-05-13 22:45:49 +03:00
Chaka
1aab8a6934
ZPOPMAX and ZPOPMIN now reply with scores. (#1011)
This is aligned with Redis' behavior.

Fixes #833

Signed-off-by: chakaz <chakaz@chakaz>
Co-authored-by: chakaz <chakaz@chakaz>
2023-03-30 08:46:53 +03:00
Chaka
7be98d906d
bug(server): Fix crash in ZPOPMIN (#977)
* Fix crash in ZPOPMIN

Crash was due to an attempt to access nullptr[-1], which is bad :)

* Add test to repro crash.

There's some leftover debugging statements, they're somewhat useful so I
kept them as the bug is not yet fixed.

* Copy patch by romange to solve the crash

Also re-enable (uncomment) the test in utility.py.

Signed-off-by: chakaz <chakaz@chakaz>

---------

Signed-off-by: chakaz <chakaz@chakaz>
Signed-off-by: Chaka <chakaz@users.noreply.github.com>
Co-authored-by: chakaz <chakaz@chakaz>
2023-03-25 10:05:41 +03:00
ashotland
39174f398a
feat(server): Support Resp3 (#975)
Accept hello 3 command and switch to resp3 response format.

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-03-22 12:18:29 +02:00
adiholden
eb5fd2867f
feat(zset_family): support zscan match and count optional params issue (#891)
* feat(zset_family): support zscan match and count optional params

---------

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-01 16:59:49 +02:00
Ali-Akber Saifee
914dd23cdb
fix(zset): Make count optional for ZPOP{MIN,MAX} (#821)
fix(zset): Make count optional for zpop{min,max}

The commands should allow count to be optional and
default to 1 as per the official redis command documentation.

Additionally update command flags to write + fast

Signed-off-by: Ali-Akber Saifee <ali@indydevs.org>
2023-02-19 21:19:45 +02:00
Roman Gershman
ac44a1f7e9
fix(server): zunion now supports variadic arguments (#717)
1. Before that we did no support a real syntax with <numkey> argument,
now we do.

2. Fix warnings.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-01-23 14:06:17 +02:00
Vladislav
7662e03d1f
fix(server): Fix Lua & Zset issue (#716)
* fix(server): Fix Lua & Zset issue

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-01-22 17:56:19 +02:00
adiholden
b2edf9c848
feat(zset family): implement a variant of ZUNION command issue #356 (#686)
Signed-off-by: ATM SALEH <saleh.cse08@gmail.com>
Signed-off-by: adi_holden <adi@dragonflydb.io>
Co-authored-by: ATM SALEH <saleh.cse08@gmail.com>
2023-01-17 12:20:22 +02:00
RedhaL
d95de3347a
feat(server): Support for LIMIT and REV in ZRANGE #422 (#456) 2022-11-03 14:57:20 +03:00
RedhaL
2e875c81c7
feat(server): Implement ZPOPMIN and ZPOPMAX #358 #359 (#378)
* Implements ZPOPMIN and ZPOPMAX commands
2022-10-13 15:01:59 +03:00
Logan Raarup
29fb499d9b
feat(server): Implement ZMSCORE command #357 (#367)
* feat(server): Implement ZMSCORE command (#357)
Signed-off-by: Logan Raarup <logan@logan.dk>
2022-10-07 14:21:06 +03:00
Boaz Sade
7715ee06c6
feat(server): zrange family command support INF as case insensitive #326 (#336)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>

Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
Co-authored-by: Boaz Sade <boaz@dragonflydb.io>
2022-09-29 19:40:33 +03:00
Roman Gershman
de9369f518
chore(server): update license text (#312) 2022-09-19 09:01:10 +03:00
Roman Gershman
d37a0bbc29 fix(zset): Properly convert non-c strings to floats.
The old code relied on c strtod function that expected some sort of delimiter
at the end. Coincidently my unit-testing code always passed proper c strings so
strod worked as expected. EVAL passes slices to non-c string and this is why the bug was
discovered via eval call. Fixes #148.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-15 00:43:39 +03:00
Ansore
f7d3f4d640
fix(zset): fixed zrevrange support of WITHSCORES.
Added zrevrange test case zset_family_test.cc.
Fixes #106
2022-06-12 11:21:18 +03:00
Roman Gershman
ec9754150f Implement PSUBSCRIBE/PUNSUBSCRIBE commands.
Add minimal tests.
2022-06-02 22:45:56 +03:00
Roman Gershman
e9dda3aa64 Implement zinterstore 2022-05-10 21:48:24 +03:00
Roman Gershman
c34e7c6d44 Implement ZUNIONSTORE.
Fix some bugs in transactional framework to support irregular commands.
Lay out groundwork for supporting XXX-STORE other commands in zsets.
2022-05-07 20:38:18 +03:00
Roman Gershman
344731d255 Bug fixes.
1. Fixes #26
2. Fixes #28
2022-04-25 19:08:21 +03:00
Roman Gershman
8ae7436a22 Reverse range for reverse z-commands. Fixes #27 2022-04-25 15:38:29 +03:00
Roman Gershman
d64a0c6f0e Add ZSCAN command 2022-04-25 00:14:40 +03:00
Roman Gershman
ec64f4e9e1 Simplify testing framework. Run(...) now returns RespExpr instead of vector of RespExpr 2022-04-22 10:31:51 +03:00
Roman Gershman
69911a95ac Add ZREMRANGEBYLEX and ZREVRANGEBYSCORE commands. 2022-04-20 23:51:48 +03:00
Roman Gershman
d8697463dc Adding ZLEXCOUNT and ZRANGEBYLEX commands. 2022-04-20 21:50:29 +03:00
Roman Gershman
f113d29918 Fix several bugs.
Fix #17, also fix #14, fix #10 and fix #16.
2022-04-18 01:17:47 +03:00
Roman Gershman
fa70267729 Add ZRANK,ZCOUNT,ZREVRANK.
1. Fix #12 - return number of added items for non-increment usecase.
2. Fix #15 - fix double precision response. I use a different printing algorithm that of Redis
   therefore there could be string differences between 2 systems. However, both replies should
   be equivalent numerically.
3. Fix #13.  Reject ZADD with LT and GT options together.
4. Fix #11 - return correct error when parsing invalid scores.
2022-04-06 22:54:10 +03:00
Roman Gershman
b9c1288c67 Implement ZINCRBY/ZADD INCR 2022-03-30 14:25:42 +03:00
Roman Gershman
5bce920308 Add ZREMRANGEBYSCORE and ZREMRANGEBYRANK commands 2022-03-19 15:22:40 +02:00
Roman Gershman
cb0d8dfee2 Add ZRANGEBYSCORE. Cover rank case for ZRANGE 2022-03-18 05:12:22 +02:00
Roman Gershman
0611a3e760 Initial work on ZRANGE command. Support BYSCORE case 2022-03-17 09:40:09 +02:00
Roman Gershman
f09f516636 Add zcard, zscore, zrem methods 2022-03-06 08:46:48 +02:00
Roman Gershman
6b869b41a7 Implement ZADD 2022-03-05 23:42:35 +02:00