Return-Path: X-Original-To: apmail-pig-dev-archive@www.apache.org Delivered-To: apmail-pig-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0CC19F87 for ; Fri, 6 Apr 2012 09:05:59 +0000 (UTC) Received: (qmail 76793 invoked by uid 500); 6 Apr 2012 09:05:59 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 76744 invoked by uid 500); 6 Apr 2012 09:05:59 -0000 Mailing-List: contact dev-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list dev@pig.apache.org Received: (qmail 76523 invoked by uid 500); 6 Apr 2012 09:05:59 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 76520 invoked by uid 99); 6 Apr 2012 09:05:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 09:05:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Apr 2012 09:05:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 3045135B0D9 for ; Fri, 6 Apr 2012 09:05:38 +0000 (UTC) Date: Fri, 6 Apr 2012 09:05:38 +0000 (UTC) From: "Prashant Kommireddi (Updated) (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <1273697015.22698.1333703138210.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <456257950.23078.1331876509066.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (PIG-2600) Better Map support 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/PIG-2600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Prashant Kommireddi updated PIG-2600: ------------------------------------- Attachment: PIG-2600_4.patch Jon, adding a new patch as per our previous discussion (changing return type to bags). I have also added test cases for various primitive types being Map values. > Better Map support > ------------------ > > Key: PIG-2600 > URL: https://issues.apache.org/jira/browse/PIG-2600 > Project: Pig > Issue Type: Improvement > Reporter: Jonathan Coveney > Assignee: Prashant Kommireddi > Fix For: 0.11 > > Attachments: PIG-2600.patch, PIG-2600_2.patch, PIG-2600_3.patch, PIG-2600_4.patch > > > It would be nice if Pig played better with Maps. To that end, I'd like to add a lot of utility around Maps. > - TOBAG should take a Map and output {(key, value)} > - TOMAP should take a Bag in that same form and make a map. > - KEYSET should return the set of keys. > - VALUESET should return the set of values. > - VALUELIST should return the List of values (no deduping). > - INVERSEMAP would return a Map of values => the set of keys that refer to that Key > This would all be pretty easy. A more substantial piece of work would be to make Pig support non-String keys (this is especially an issue since UDFs and whatnot probably assume that they are all Integers). Not sure if it is worth it. > I'd love to hear other things that would be useful for people! -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira