[
https://issues.apache.org/jira/browse/PIG-3733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13886899#comment-13886899
]
sudhir mallem commented on PIG-3733:
------------------------------------
Yes. If the semi-colon is part of REGEX statement, it works. whereas in
Function like CONCAT, its not working. I'm not sure if other functions which
has ";" has the same problem.
For example, if there is a variable substitution and the variable has
semi-colon, it fails.
here is an example:
{code}
[smallem@eat1-hcl4014 ~]$ vi testvar.pig
%declare testVar 'hello;';
a = load '/user/smallem/mem.csv' using PigStorage('|') as (uid:int,
sid:chararray);
b = foreach a generate uid, sid, $testVar as newcol;
dump b
{code}
> Pig fails to concatenate semi-colon in generate statement
> ---------------------------------------------------------
>
> Key: PIG-3733
> URL: https://issues.apache.org/jira/browse/PIG-3733
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.11.1
> Reporter: sudhir mallem
>
> Pig fails to concatenate semi-colon to a column in a generate statement. I've
> tried multiple ways including unicode version (\\u003B), but fails.
> {code}
> grunt> a = load '/user/smallem/mem.csv' using PigStorage('|') as (uid:int,
> sid:chararray);
> grunt> b = foreach a generate uid as uid, CONCAT('v=1;',sid) as sids;
> <line 3, column 0> mismatched character '<EOF>' expecting '''
> 2014-01-30 08:51:51,759 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR
> 1200: <line 3, column 0> mismatched character '<EOF>' expecting '''
> Details at logfile: /export/home/smallem/pig_1391071809426.log
> {code}
> The same however works when used nested statement.
> {code}
> grunt> a = load '/user/smallem/mem.csv' using PigStorage('|') as (uid:int,
> sid:chararray);
> grunt> b = foreach a {
>
> >> x = CONCAT('v=1;',sid);
> >> generate uid as memberuid, x as sids ;
> >> };
> grunt>
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)