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 29C8C173EC for ; Fri, 10 Oct 2014 07:00:48 +0000 (UTC) Received: (qmail 25875 invoked by uid 500); 10 Oct 2014 07:00:47 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 25825 invoked by uid 500); 10 Oct 2014 07:00:47 -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 25813 invoked by uid 500); 10 Oct 2014 07:00:47 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 25810 invoked by uid 99); 10 Oct 2014 07:00:47 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 10 Oct 2014 07:00:47 +0000 Date: Fri, 10 Oct 2014 07:00:47 +0000 (UTC) From: "Daniel Dai (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PIG-4227) Streaming Python UDF handles bag outputs incorrectly MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-4227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14166477#comment-14166477 ] Daniel Dai commented on PIG-4227: --------------------------------- +1 > Streaming Python UDF handles bag outputs incorrectly > ---------------------------------------------------- > > Key: PIG-4227 > URL: https://issues.apache.org/jira/browse/PIG-4227 > Project: Pig > Issue Type: Bug > Reporter: Cheolsoo Park > Assignee: Cheolsoo Park > Fix For: 0.15.0 > > Attachments: PIG-4227-1.patch > > > I have a udf that generates different outputs when running as jython and streaming python. > {code:title=jython} > {([[BBC Worldwide]])} > {code} > {code:title=streaming python} > {(BC Worldwid)} > {code} > The problem is that streaming python encodes a bag output incorrectly. For this particular example, it serializes the output string as follows- > {code} > |{_[[BBC Worldwide]]|}_ > {code} > where '|' and '\_' wrap bag delimiters '\{' and '\}'. i.e. '\{' => '|\{\_' and '\}' => '|\}\_'. > But this is wrong because bag must contain tuples not chararrays. i.e. the correct encoding is as follows- > {code} > |{_|(_[[BBC Worldwide]]|)_|}_ > {code} > where '|' and '_' wrap tuple delimiters '(' and ')' as well as bag delimiters. > This results in truncated outputs. -- This message was sent by Atlassian JIRA (v6.3.4#6332)