]> git.saurik.com Git - redis.git/commit - tests/unit/sort.tcl
SORT is now more deterministic: does not accept to compare by score items that have...
authorantirez <antirez@gmail.com>
Wed, 1 Feb 2012 14:22:28 +0000 (15:22 +0100)
committerantirez <antirez@gmail.com>
Wed, 1 Feb 2012 14:22:28 +0000 (15:22 +0100)
commit2c861050c17237a61fdaff4da2777c5d18ce979a
tree09a3f9e9f9525c1e3e1543bcd641ced6e090c47c
parent548efd91e5a33e1358213a902b8533d88f40f7cf
SORT is now more deterministic: does not accept to compare by score items that have scores not representing a valid double. Also items with the same score are compared lexycographically. At the same time the scripting side introduced the ability to sort the output of SORT when sort uses the BY <constant> optimization, resulting in no specific ordering. Since in this case the user may use GET, and the result of GET can be null, converted into false as Lua data type, this commit also introduces the ability to sort Lua tables containining false, only if the first (faster) attempt at using just table.sort with a single argument fails.
src/redis.c
src/redis.h
src/scripting.c
src/sort.c
tests/unit/sort.tcl