[
https://issues.apache.org/jira/browse/PIG-394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Olga Natkovich updated PIG-394:
-------------------------------
Fix Version/s: (was: 0.10)
> 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
>
> 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.
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