From dev-return-59981-archive-asf-public=cust-asf.ponee.io@pig.apache.org Fri Oct 12 19:07:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id B67EB180660 for ; Fri, 12 Oct 2018 19:07:05 +0200 (CEST) Received: (qmail 68197 invoked by uid 500); 12 Oct 2018 17:07: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 68186 invoked by uid 500); 12 Oct 2018 17:07:04 -0000 Delivered-To: apmail-hadoop-pig-dev@hadoop.apache.org Received: (qmail 68183 invoked by uid 99); 12 Oct 2018 17:07:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Oct 2018 17:07:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3D7F6180A5E for ; Fri, 12 Oct 2018 17:07:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BV3-ou6kWVte for ; Fri, 12 Oct 2018 17:07: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 AF0585F5B1 for ; Fri, 12 Oct 2018 17:07:01 +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 F34A0E25D5 for ; Fri, 12 Oct 2018 17:07:00 +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 8AAFF24DC4 for ; Fri, 12 Oct 2018 17:07:00 +0000 (UTC) Date: Fri, 12 Oct 2018 17:07:00 +0000 (UTC) From: "Rohini Palaniswamy (JIRA)" To: pig-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (PIG-5362) Parameter substitution of shell cmd results doesn't handle backslash MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/PIG-5362?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Rohini Palaniswamy updated PIG-5362: ------------------------------------ Resolution: Fixed Assignee: Will Lauer Hadoop Flags: Reviewed Fix Version/s: 0.18.0 Status: Resolved (was: Patch Available) +1. Committed to trunk. Fixed typo testEscaing to testEscaping before commi= tting. Thanks [~wlauer@yahoo-inc.com] for fixing this. > Parameter substitution of shell cmd results doesn't handle backslash=09 > --------------------------------------------------------------------- > > Key: PIG-5362 > URL: https://issues.apache.org/jira/browse/PIG-5362 > Project: Pig > Issue Type: Bug > Components: parser > Reporter: Will Lauer > Assignee: Will Lauer > Priority: Minor > Fix For: 0.18.0 > > Attachments: pig.patch, pig2.patch, pig3.patch > > > It looks like there is a bug in how parameter substitution is handled in = PreprocessorContext.java that causes parameter values that contain backslas= hed to not be processed correctly, resulting in the backslashes being lost.= For example, if you had the following: > {code:java} > %DECLARE A `echo \$foo\\bar` > B =3D LOAD $A=20 > {code} > You would expect the echo command to produce the output=C2=A0{{$foo\bar}}= =C2=A0but the actual value that gets substituted is=C2=A0{{\$foobar}}. This= is happening because the=C2=A0{{substitute}}=C2=A0method in PreprocessorCo= ntext.java uses a regular expression replacement instead of a basic string = substitution and $=C2=A0and=C2=A0\ are special characters. The code attempt= s to escape $, but does not escape backslash. -- This message was sent by Atlassian JIRA (v7.6.3#76005)