diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-08-07 20:31:25 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-08-07 20:31:25 +0000 |
commit | 091fa8befade40aac2e0ac4da3ffc9c6b8c6e877 (patch) | |
tree | 6a50adcd84494a7c79521d0e5daaf83881e61cb0 /src | |
parent | 7a54c606026381bd73c00b436e063739a1309319 (diff) |
builtin reduce functions more forgiving about trailing whitespace and other characters
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@983306 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/couchdb/couch_query_servers.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/couchdb/couch_query_servers.erl b/src/couchdb/couch_query_servers.erl index 6660ee74..0e00e3e2 100644 --- a/src/couchdb/couch_query_servers.erl +++ b/src/couchdb/couch_query_servers.erl @@ -150,16 +150,16 @@ os_rereduce(Lang, OsRedSrcs, KVs) -> builtin_reduce(_Re, [], _KVs, Acc) -> {ok, lists:reverse(Acc)}; -builtin_reduce(Re, [<<"_sum">>|BuiltinReds], KVs, Acc) -> +builtin_reduce(Re, [<<"_sum",_/binary>>|BuiltinReds], KVs, Acc) -> Sum = builtin_sum_rows(KVs), builtin_reduce(Re, BuiltinReds, KVs, [Sum|Acc]); -builtin_reduce(reduce, [<<"_count">>|BuiltinReds], KVs, Acc) -> +builtin_reduce(reduce, [<<"_count",_/binary>>|BuiltinReds], KVs, Acc) -> Count = length(KVs), builtin_reduce(reduce, BuiltinReds, KVs, [Count|Acc]); -builtin_reduce(rereduce, [<<"_count">>|BuiltinReds], KVs, Acc) -> +builtin_reduce(rereduce, [<<"_count",_/binary>>|BuiltinReds], KVs, Acc) -> Count = builtin_sum_rows(KVs), builtin_reduce(rereduce, BuiltinReds, KVs, [Count|Acc]); -builtin_reduce(Re, [<<"_stats">>|BuiltinReds], KVs, Acc) -> +builtin_reduce(Re, [<<"_stats",_/binary>>|BuiltinReds], KVs, Acc) -> Stats = builtin_stats(Re, KVs), builtin_reduce(Re, BuiltinReds, KVs, [Stats|Acc]). |