Why does HKEYS return an array and not a set in RESP3?

The keys in a hash are unique an unordered. That should be a set, right?

Can we fix it in Redis 8?

That's the first question. I have a few more, similar questions.

Q2. Why is the 2nd element in the return value of HSCAN a flat array and not a map?

Actual:

127.0.0.1:6379> hscan h 0
1) "0"
2) 1) "a"
   2) "1"
   3) "b"
   4) "2"
   5) "c"
   6) "3"

Better, IMHO:

127.0.0.1:6379> hscan h 0
1) "0"
2) 1# "a" => "1"
   2# "b" => "2"
   3# "c" => "3"

Q3. Why is the 2nd argument of SSCAN an array and not a set?

SMEMBERS does return a set. Shouldn't SSCAN and SMEMBERS return the members in the same way?

Q4. Why is the 2nd argument of HSCAN NOVALUES an array an not a set?

Comment From: darkb0ts

Consistency with HSCAN. Returning an array for keys aligns with the full HSCAN output.