You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Olga Natkovich (JIRA)" <ji...@apache.org> on 2011/03/17 22:28:29 UTC
[jira] Updated: (PIG-394) Syntax for ?: requires parens in FOREACH
[ 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.9.0)
0.10
delaying to 0.10 to let current parser changes to stabilize. We need to make paranthesis optional for bincond.
> 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.10
>
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira