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 410A210D61 for ; Wed, 3 Dec 2014 10:43:50 +0000 (UTC) Received: (qmail 8990 invoked by uid 500); 3 Dec 2014 10:22:44 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 98870 invoked by uid 500); 3 Dec 2014 10:22:40 -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 82446 invoked by uid 500); 3 Dec 2014 10:22:20 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 70375 invoked by uid 99); 3 Dec 2014 09:45:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Dec 2014 09:45:12 +0000 Date: Wed, 3 Dec 2014 09:45:12 +0000 (UTC) From: "Michael Prim (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (PIG-4326) AvroStorageSchemaConversionUtilities does not properly convert schema for maps of arrays of records 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-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14232823#comment-14232823 ] Michael Prim commented on PIG-4326: ----------------------------------- [~daijy] Did you have a chance to test the new patch? Would like to get this done and out of my scope :) > AvroStorageSchemaConversionUtilities does not properly convert schema for maps of arrays of records > --------------------------------------------------------------------------------------------------- > > Key: PIG-4326 > URL: https://issues.apache.org/jira/browse/PIG-4326 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.12.0, 0.13.0 > Reporter: Michael Prim > Assignee: Michael Prim > Fix For: 0.15.0 > > Attachments: PIG-4326-0.patch, mapsOfArraysOfRecords.patch, supportForMapsOfArraysOfRecords.patch > > > I tried to convert the avro schema of a map of arrays of records into the proper pig schema and got always empty map schemas in pig. > The reason is that the AvroStorageSchemaConversionUtilities does only assume records or primitive types as content of the map. However, a map of arrays, or a map of map, could have a schema itself and requires recursive calling to derive the full schema. > I wrote a unit test to test for maps of arrays of records which fails with every pig release since the AvroStorage was rewritten (I think this was in 0.12), and there have been no changes since then in the trunk. > Further the attached patch contains the (rather simple) fix that makes the schema conversion utils succeed. > Would appreciate further comments and if this can be included upstream. -- This message was sent by Atlassian JIRA (v6.3.4#6332)