You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ted Dunning (JIRA)" <ji...@apache.org> on 2008/08/24 20:29:44 UTC
[jira] Created: (PIG-394) Syntax for ?: requires parens in FOREACH
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
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.