Github user davisp commented on the issue:

    https://github.com/apache/couchdb-couch/pull/229
  
    My bad, I missed the fact that we were talking about removing the top level 
value. I don't think we should do that in this case because of what I described 
earlier. These are just alternative implementations of reduce functions. As 
such they can return whatever we want them to although it should probably stay 
within the confines of the existing protocol.
    
    As to the point that users could write a reduce function that maps to the 
same error object, that's precisely the point. Users could write this 
themselves in JavaScript. The only reason that builtins exist is for 
performance for the common cases of counting, summing, and statistics. 
Inventing a new protocol for builtin reduces seems a bit of a crossing of 
abstractions. Granted we could go and create a whole new protocol that custom 
reduce functions could use, but that seems significantly different than the 
original intention of this ticket.
    
    For extra specificity the full response would look something like such:
    
    {
      "rows": [
        {"key": $whatever, "value":{"error": "builtin_reduce_error", "reason": 
"stuff", "caused_by": bad_value}},
        ...
    ]}
    
    If we want to change the row definition there then we do have to go and 
start changing our protocols which does require things like multiple rolling 
reboots. However if we do go that direction we should think harder and make it 
an available option for custom reduce functions as well.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to