stephenmcd / curiodb

Distributed NoSQL Database
http://curiodb.jupo.org
BSD 2-Clause "Simplified" License
511 stars 47 forks source link

fix set aggregation operations when some key does not exist #16

Closed meteorgan closed 8 years ago

meteorgan commented 8 years ago

When using set aggregation operations, if some key does not exists. curiodb return ErrorReply. but in redis, it ignores the empty. here is the test: 127.0.0.1:6379> keys * 1) "website2" 2) "website1" 127.0.0.1:6379> smembers website1 1) "google.com" 2) "baidu.com" 127.0.0.1:6379> sunion website1 website3 "ErrorReply"

The reason is in commands.conf, default value of set is seq, when convert to mutable.set is nil. after change: 127.0.0.1:6379> sunion website1 website3 1) "google.com" 2) "baidu.com"

stephenmcd commented 8 years ago

That's a great set of fixes, thanks very much!