Support the `SUNIONCARD` command
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Start by locating the existing set union command implementation and its tests in Kvrocks, then read how commands parse key counts and optional arguments. Add support for SUNIONCARD with the documented APPROX and LIMIT options; done means its results match the examples and Redis command behavior.
Written by the indexing model from the issue text.
Description
Search before asking
- I had searched in the issues and found no similar issues.
Motivation
Redis 8.10.0 added SUNIONCARD (redis/redis#14893). It returns the cardinality of the union of the given sets, without sending the members back to the client.
Syntax (Redis 8.10.0)
SUNIONCARD numkeys key [key ...] [APPROX] [LIMIT limit]
Example
> SADD key1 a b c
(integer) 3
> SADD key2 c d e
(integer) 3
> SUNIONCARD 2 key1 key2
(integer) 5
> SUNIONCARD 2 key1 key2 LIMIT 3
(integer) 3
> SUNIONCARD 2 key1 key2 APPROX
(integer) 5
Solution
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Dominant language
- C++
- Stars
- 4.5k
- Forks
- 686
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 40
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/kvrocks
-
HSETEXPIRE with an overflowing TTL returns OK and deletes the whole hashPossibly taken @anubhavgupta121 claimed this 17 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day
-
SSCAN, HSCAN, ZSCAN don't finish when an empty-string member is returned at the end of a pagePossibly taken @ggyuchive claimed this today. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
`GEOSEARCH` / `GEORADIUS` with a negative radius hangsPossibly taken @ggyuchive claimed this 6 days ago. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
`ZDIFFSTORE` and `ZINTERSTORE` with numkeys 0 crash the server (SIGSEGV)Possibly taken @siddiqueirshad claimed this 8 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
`NAMESPACE ADD/SET/DEL` and `CONFIG REWRITE` rewrite `kvrocks.conf` without fsync: after a power loss new namespaces vanish, and deleted namespaces / rotated tokens are valid againPossibly taken @Tyagiquamar claimed this 14 days ago. Openbug
Difficulty 4/5 3-5 days Newbie friendliness 50/100
Maintainers usually reply within 1 day
Similar issues
-
documentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
QuantStack/git2cpp#203 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
BaptisteHudyma/Lamp-Da#588 ·
Maintainers usually reply within 1 day
-
bug macOS networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
docling-project/docling-parse#448 ·
Maintainers usually reply within 5 days