I used hmget on a empty key and it returned null for all the values and fields.
127.0.0.1:6379> hmget key a b c d e f g 1) (nil) 2) (nil) 3) (nil) 4) (nil) 5) (nil) 6) (nil) 7) (nil)
I think for performance it would help if the key doesn't exist then there is no reason to check the fields values which obviously don't exist either so instead of sending back X number of null fields - which take up bandwidth and processing power - it should only return one simple null and return.
Also, thanks for adding my take command! you named it getdel for some reason but I'm still happy you implemented it.
Comment From: madolson
Hey @gittyup2018, unfortunately this would be a backwards incompatible change so we can't really make this change. It's also good to think of an empty key as an empty hash when executing hget, so returning null for each value is the correct behavior.
Comment From: oranagra
this is also explicitly documented in https://redis.io/commands/hmget