Return-Path: X-Original-To: apmail-datafu-dev-archive@minotaur.apache.org Delivered-To: apmail-datafu-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E90881156D for ; Sat, 26 Apr 2014 00:18:41 +0000 (UTC) Received: (qmail 1604 invoked by uid 500); 26 Apr 2014 00:18:41 -0000 Delivered-To: apmail-datafu-dev-archive@datafu.apache.org Received: (qmail 1561 invoked by uid 500); 26 Apr 2014 00:18:41 -0000 Mailing-List: contact dev-help@datafu.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@datafu.incubator.apache.org Delivered-To: mailing list dev@datafu.incubator.apache.org Received: (qmail 1553 invoked by uid 99); 26 Apr 2014 00:18:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Apr 2014 00:18:41 +0000 X-ASF-Spam-Status: No, hits=-2000.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 26 Apr 2014 00:18:40 +0000 Received: (qmail 1392 invoked by uid 99); 26 Apr 2014 00:18:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Apr 2014 00:18:15 +0000 Date: Sat, 26 Apr 2014 00:18:15 +0000 (UTC) From: "Jakob Homan (JIRA)" To: dev@datafu.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DATAFU-38) BagGroup merges rows MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DATAFU-38?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13981789#comment-13981789 ] Jakob Homan commented on DATAFU-38: ----------------------------------- Something is funky with the assignee. I can't find the Sam that contributed the code in the user list, so we've got someone with the same email (sds, but not same domain). Not sure what's going on. > BagGroup merges rows > -------------------- > > Key: DATAFU-38 > URL: https://issues.apache.org/jira/browse/DATAFU-38 > Project: DataFu > Issue Type: Bug > Reporter: Sam > Assignee: sds > Fix For: 1.3.0 > > Attachments: BagGroup-38.patch > > > load > {code} > 1,a,A,1 > 1,b,A,2 > 1,a,B,3 > 2,c,C,4 > 2,b,B,5 > 2,b,C,6 > {code} > using {{tmp_datafu = load 'test' using PigStorage(',') as (id:chararray, domain:chararray, keyword:chararray, weight:int);}} > and do > {code} > tmp_roll = foreach (group tmp_datafu by id) generate > group as id, > CountEach(tmp_datafu.domain) as domains, > BagGroup(tmp_datafu.(keyword,weight),tmp_datafu.keyword) as keywords; > {code} > the result is > {code} > (1,{(b,1),(a,2)},{(B,{(B,3)}),(A,{(A,1),(A,2)})}) > (2,{(c,1),(b,2)},{(B,{(B,3),(B,5)}),(A,{(A,1),(A,2)}),(C,{(C,4),(C,6)})}) > {code} > instead of > {code} > (1,{(b,1),(a,2)},{(B,{(B,3)}),(A,{(A,1),(A,2)})}) > (2,{(c,1),(b,2)},{(B,{(B,5)}),(C,{(C,4),(C,6)})}) > {code} > see also > http://stackoverflow.com/questions/22945236/how-do-i-accumulate-vectors-into-a-map -- This message was sent by Atlassian JIRA (v6.2#6252)