Github user davisp commented on a diff in the pull request:

    https://github.com/apache/couchdb-couch/pull/229#discussion_r103794067
  
    --- Diff: src/couch_query_servers.erl ---
    @@ -169,6 +178,19 @@ sum_values(Value, Acc) when is_number(Value), 
is_list(Acc) ->
         sum_arrays(Acc, [Value]);
     sum_values(Value, Acc) when is_list(Value), is_number(Acc) ->
         sum_arrays([Acc], Value);
    +sum_values({Props}, Acc) ->
    +    case lists:keyfind(<<"error">>, 1, Props) of
    --- End diff --
    
    Also unfortunately but we can't return anything but an EJSON value from 
this because there's no way to insert a convert-to-EJSON step later on. And any 
attempt to do so would be outside of the standard reduce function APIs and 
would prevent any non-builtin reduce from participating in that protocol (cause 
other language can only pass JSON around).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to