[ 
https://issues.apache.org/jira/browse/PIG-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alan Gates reassigned PIG-394:
------------------------------

    Assignee: Xuefu Zhang

> Syntax for ?: requires parens in FOREACH
> ----------------------------------------
>
>                 Key: PIG-394
>                 URL: https://issues.apache.org/jira/browse/PIG-394
>             Project: Pig
>          Issue Type: Bug
>          Components: grunt
>    Affects Versions: 0.1.0
>            Reporter: Ted Dunning
>            Assignee: Xuefu Zhang
>             Fix For: 0.9.0
>
>
> This fails
> clean = FOREACH log {
>     ev = eventType eq '/rate/video'?'none':eventType;
>     GENERATE ev as event, 1 as cnt;
> }
> but this works
> clean = FOREACH log {
>     ev = (eventType eq '/rate/video'?'none':eventType);
>     GENERATE ev as event, 1 as cnt;
> }
> The requirement for parens is bogus.  Also, this fails with very misleading 
> messages:
> clean = FOREACH log {
>     ev = (eventType eq '/rate/video')?'none':eventType;
>     GENERATE ev as event, 1 as cnt;
> }
> I think that the parser needs to be completely revamped to avoid this sort of 
> strangeness.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to