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 D328B7B04 for ; Tue, 4 Oct 2011 23:59:55 +0000 (UTC) Received: (qmail 39122 invoked by uid 500); 4 Oct 2011 23:59:55 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 39087 invoked by uid 500); 4 Oct 2011 23:59:55 -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 39079 invoked by uid 500); 4 Oct 2011 23:59:55 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 39076 invoked by uid 99); 4 Oct 2011 23:59:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Oct 2011 23:59:55 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,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; Tue, 04 Oct 2011 23:59:54 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 0B65E2A986C for ; Tue, 4 Oct 2011 23:59:34 +0000 (UTC) Date: Tue, 4 Oct 2011 23:59:34 +0000 (UTC) From: "Olga Natkovich (Updated) (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <1994290178.9909.1317772774048.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <208949206.29238.1313087071030.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (PIG-2216) deprecate use of type in as clause of foreach statement 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-2216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Olga Natkovich updated PIG-2216: -------------------------------- Fix Version/s: (was: 0.10) > deprecate use of type in as clause of foreach statement > ------------------------------------------------------- > > Key: PIG-2216 > URL: https://issues.apache.org/jira/browse/PIG-2216 > Project: Pig > Issue Type: Bug > Reporter: Thejas M Nair > > In the as clause of foreach statement, type can be specified, but that type is actually not used (ie, it does not result in a cast). This behavior is misleading. > {code} > F = foreach INP generate c1 as (name : chararray); > {code} > Pig 0.8 produces an error if c1 in above example is not of same type as specified in the as clause. > In 0.9, that check seems to have been lost in the parser migration. It also results in the logical plan thinking that the type of c1 is that specified in the as clause. That can cause errors such as ClassCastException. > One way to be consistent here would have been to add cast for the as clause as well. But having two ways to cast complicates things. So long term, I think the use of types in as clause should be removed. > For 0.10, i think the check present in 0.8 should be added back, and the syntax should be deprecated (resulting in a warning when used). -- 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