Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge remote branch 'cloudant:70794-fix-initial-acc-for-builtin_sum_r…
…ows'

This closes #234

Signed-off-by: ILYA Khlopotov <iilyak@apache.org>
  • Loading branch information
iilyak committed Mar 8, 2017
2 parents cb3b35a + 1f152da commit 5685f172d232700412e9c34dba0407c5acebe8f8
Showing 1 changed file with 2 additions and 2 deletions.
@@ -142,13 +142,13 @@ os_rereduce(Lang, OsRedSrcs, KVs) ->
builtin_reduce(_Re, [], _KVs, Acc) ->
{ok, lists:reverse(Acc)};
builtin_reduce(Re, [<<"_sum",_/binary>>|BuiltinReds], KVs, Acc) ->
Sum = builtin_sum_rows(KVs, []),
Sum = builtin_sum_rows(KVs, 0),
builtin_reduce(Re, BuiltinReds, KVs, [Sum|Acc]);
builtin_reduce(reduce, [<<"_count",_/binary>>|BuiltinReds], KVs, Acc) ->
Count = length(KVs),
builtin_reduce(reduce, BuiltinReds, KVs, [Count|Acc]);
builtin_reduce(rereduce, [<<"_count",_/binary>>|BuiltinReds], KVs, Acc) ->
Count = builtin_sum_rows(KVs, []),
Count = builtin_sum_rows(KVs, 0),
builtin_reduce(rereduce, BuiltinReds, KVs, [Count|Acc]);
builtin_reduce(Re, [<<"_stats",_/binary>>|BuiltinReds], KVs, Acc) ->
Stats = builtin_stats(Re, KVs),

0 comments on commit 5685f17

Please sign in to comment.