Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AFBDF200D42 for ; Thu, 2 Nov 2017 19:41:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AE395160BE5; Thu, 2 Nov 2017 18:41:05 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F24311609EB for ; Thu, 2 Nov 2017 19:41:04 +0100 (CET) Received: (qmail 49995 invoked by uid 500); 2 Nov 2017 18:41:04 -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 49718 invoked by uid 500); 2 Nov 2017 18:41:03 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 49650 invoked by uid 99); 2 Nov 2017 18:41:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Nov 2017 18:41:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3FF381A4DD8 for ; Thu, 2 Nov 2017 18:41:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 5vAQfZR2sSE0 for ; Thu, 2 Nov 2017 18:41:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 1FE7760F11 for ; Thu, 2 Nov 2017 18:41:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 56213E2570 for ; Thu, 2 Nov 2017 18:41:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id CDA1A24166 for ; Thu, 2 Nov 2017 18:41:00 +0000 (UTC) Date: Thu, 2 Nov 2017 18:41:00 +0000 (UTC) From: "Travis Woodruff (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PIG-5312) Uids not set in inner schemas after UNION ON_SCHEMA MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 02 Nov 2017 18:41:05 -0000 [ https://issues.apache.org/jira/browse/PIG-5312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Travis Woodruff updated PIG-5312: --------------------------------- Assignee: (was: Travis Woodruff) Status: Patch Available (was: Open) > Uids not set in inner schemas after UNION ON_SCHEMA > --------------------------------------------------- > > Key: PIG-5312 > URL: https://issues.apache.org/jira/browse/PIG-5312 > Project: Pig > Issue Type: Bug > Affects Versions: 0.17.0, 0.16.0 > Reporter: Travis Woodruff > Priority: Normal > Attachments: PIG-5312.patch > > > Ran into a failure with a script of the form: > {code} > u = union on_schema x, y; -- schema: (a, b: {(m:int, n: chararray)}) > z = foreach u { > i = foreach b generate m + 5; > generate a, i; > } > {code} > The issue ended up being that {{LOUnion}} is not setting uids on inner schemas. This means that uids on inner schema fields are all -1, so when {{ProjectExpression.getFieldSchema()}} tries to look up the fields in the inner select from the inner schema, all the fields match, and the last field's schema ends up being returned. In the example above this causes {{TypeCheckingExpVisitor.addCastsToNumericBinExpression()}} to fail for the addition operator (since the returned field schema is a chararray). > This only seems to affect the schema, so I don't think this should cause bad data to be produced. -- This message was sent by Atlassian JIRA (v6.4.14#64029)