You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Ankur (JIRA)" <ji...@apache.org> on 2010/04/26 08:49:33 UTC
[jira] Created: (PIG-1393) Bug in Nested FOREACH
Bug in Nested FOREACH
---------------------
Key: PIG-1393
URL: https://issues.apache.org/jira/browse/PIG-1393
Project: Pig
Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Ankur
Fix For: 0.8.0
Following script makes the parser throw an error
A = load 'data' as ( a: int, b: map[]) ;
B = foreach A generate ((chararray) b#'url') as url;
C = foreach B {
urlQueryFields = url#'queryFields';
result = (urlQueryFields is not null) ? urlQueryFields : 1;
generate result;
};
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (PIG-1393) Bug in Nested FOREACH
Posted by "Richard Ding (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12889298#action_12889298 ]
Richard Ding commented on PIG-1393:
-----------------------------------
You need to add parentheses around the binary conditions to avoid the parser error:
{code}
C = foreach B { urlQueryFields = url#'queryFields'; result = ((urlQueryFields is not null) ? urlQueryFields : 1); generate result; };
{code}
> Bug in Nested FOREACH
> ---------------------
>
> Key: PIG-1393
> URL: https://issues.apache.org/jira/browse/PIG-1393
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.7.0
> Reporter: Ankur
> Fix For: 0.8.0
>
>
> Following script makes the parser throw an error
> A = load 'data' as ( a: int, b: map[]) ;
> B = foreach A generate ((chararray) b#'url') as url;
> C = foreach B {
> urlQueryFields = url#'queryFields';
> result = (urlQueryFields is not null) ? urlQueryFields : 1;
> generate result;
> };
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (PIG-1393) Bug in Nested FOREACH
Posted by "Olga Natkovich (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-1393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olga Natkovich resolved PIG-1393.
---------------------------------
Resolution: Invalid
> Bug in Nested FOREACH
> ---------------------
>
> Key: PIG-1393
> URL: https://issues.apache.org/jira/browse/PIG-1393
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.7.0
> Reporter: Ankur
> Fix For: 0.8.0
>
>
> Following script makes the parser throw an error
> A = load 'data' as ( a: int, b: map[]) ;
> B = foreach A generate ((chararray) b#'url') as url;
> C = foreach B {
> urlQueryFields = url#'queryFields';
> result = (urlQueryFields is not null) ? urlQueryFields : 1;
> generate result;
> };
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.