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 1E742DC35 for ; Tue, 25 Sep 2012 06:15:09 +0000 (UTC) Received: (qmail 71625 invoked by uid 500); 25 Sep 2012 06:15:08 -0000 Delivered-To: apmail-pig-dev-archive@pig.apache.org Received: (qmail 71414 invoked by uid 500); 25 Sep 2012 06:15:08 -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 71398 invoked by uid 500); 25 Sep 2012 06:15:08 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 71391 invoked by uid 99); 25 Sep 2012 06:15:08 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Sep 2012 06:15:08 +0000 Date: Tue, 25 Sep 2012 17:15:08 +1100 (NCT) From: "Rohini Palaniswamy (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: <1033863683.120691.1348553708053.JavaMail.jiratomcat@arcas> In-Reply-To: <1739650704.28936.1336166688226.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (PIG-2681) TestDriverPig.countStores() does not correctly count the number of stores for pig scripts using variables for the alias 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-2681?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rohini Palaniswamy updated PIG-2681: ------------------------------------ Status: Open (was: Patch Available) Cancelling this patch as it is not a suitable solution for all cases. Easier solution would be to just have a variable that gives the number of stores for complex tests as suggested by [~aklochkov]. > TestDriverPig.countStores() does not correctly count the number of stores for pig scripts using variables for the alias > ----------------------------------------------------------------------------------------------------------------------- > > Key: PIG-2681 > URL: https://issues.apache.org/jira/browse/PIG-2681 > Project: Pig > Issue Type: Test > Components: e2e harness > Affects Versions: 0.10.0, 0.9.2, 0.9.1, 0.9.0 > Reporter: Araceli Henley > Fix For: 0.9.3, 0.11, 0.10.1 > > Attachments: PIG-2681.patch > > > For pig macros where the out parameter is referenced in a store statement, the TestDriveP.countStores() does not correctly count the number of stores: > For example, the store will not be counted in : > define myMacro(in1,in2) returns A { > A = load '$in1' using PigStorage('$delimeter') as (intnum1000: int,id: int,intnum5: int,intnum100: int,intnum: int,longnum: long,floatnum: float,doublenum: double); > store $A into '$out'; > } > countStores() matches with: > $count += $q[$i] =~ /store\s+[a-zA-Z][a-zA-Z0-9_]*\s+into/i; > Since the alias has a special character "$" it doesn't count it and the test fails. > Need to change this to: > $count += $q[$i] =~ /store\s+(\$)?[a-zA-Z][a-zA-Z0-9_]*\s+into/i; > I'll submit a patch shortly. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira