Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 85061 invoked from network); 29 Apr 2010 06:20:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Apr 2010 06:20:01 -0000 Received: (qmail 53597 invoked by uid 500); 29 Apr 2010 06:20:01 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 53351 invoked by uid 500); 29 Apr 2010 06:20:00 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 53343 invoked by uid 99); 29 Apr 2010 06:19:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 06:19:59 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ivan.bodunov@gmail.com designates 209.85.218.221 as permitted sender) Received: from [209.85.218.221] (HELO mail-bw0-f221.google.com) (209.85.218.221) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Apr 2010 06:19:52 +0000 Received: by bwz21 with SMTP id 21so13972888bwz.35 for ; Wed, 28 Apr 2010 23:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=eh9BWaRg4vYRVXk5rQOJQ+xhfhyQyxC3svY9lW22II4=; b=DGyDDt0IBFYolvx9TYpLGreMFJNIS8mpFV0iB9bRzZbkPIudtqwIDo1fHsy2cTkfKz WVS2xR3dgFcz4uzdH4/jV430W69QEV5bDELPSDPpRsK5S4OzxFbKUT5C/kGxsdodjhIz 7CB18Y0kSPoYZnEeGYm/Cw0BjnnRVVRFSRRug= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=nQ2KWpPorykWJpdBqi3PLnE0bWRkGya92dINa3qk3Krtw216NQmL2H+0/+69/+0MIY cuWlEzKvRT5BCg5dcpBrgfYL9T2ljmIRw+2aJRWeZP+L+COpBUIFtOD0iwgyUIdI5Ve7 KFmTJPsed3rfTIPLOeblsLkaSKMM0O1a6AgHA= MIME-Version: 1.0 Received: by 10.204.9.152 with SMTP id l24mr5478555bkl.193.1272521972333; Wed, 28 Apr 2010 23:19:32 -0700 (PDT) Received: by 10.204.69.197 with HTTP; Wed, 28 Apr 2010 23:19:32 -0700 (PDT) Date: Wed, 28 Apr 2010 23:19:32 -0700 Message-ID: Subject: Re: _sum function in Erlang reduce doesn't work From: Ivan Bodunov To: dev@couchdb.apache.org Content-Type: multipart/alternative; boundary=0015175883c8213e2a04855a1ce9 X-Virus-Checked: Checked by ClamAV on apache.org --0015175883c8213e2a04855a1ce9 Content-Type: text/plain; charset=ISO-8859-1 Ah, ok.. Yes, _just_ "_sum" as a body of "reduce" function works fine. I just could not think of such approach because imho it has very limited applicability. Thanks for clarification. Ivan ++++++++++++ No, you misunderstood. The exact text of the reduce in the design doc should just be "_sum". That is not a function call but a special sentinel that couch recognizes as signalling a summation reduction. If that doesn't work please file a bug report on JIRA. On Apr 28, 2010 6:29 PM, "Ivan Bodunov" wrote: Hi, I have a view in Erlang. Its reduce() function looks like following: fun(Keys, Values, ReReduce) -> _sum(Values) end. >>From #couchdb irc I understood that it should work (similarly to JS view). But Couch produces crash report when such view is triggered. Crash report is behind the following link: http://friendpaste.com/5fAlSeKV0wpe1gWEKweVUR Ivan --0015175883c8213e2a04855a1ce9--