[ 
https://issues.apache.org/jira/browse/PIG-972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12875390#action_12875390
 ] 

Aniket Mokashi commented on PIG-972:
------------------------------------

Approach mentioned above seems to work.

Here are some proposals on semantics of nested describe-
>a = load '1.txt' as (a0:int, a1:int);
>b = group a by $0;

Proposal 1- Explicit describe.
>c = foreach b { d = order a by $0; describe d; e = ...; generate d.$0 ...;}
(1a:Instantaneous responce - describes d after parsing above statement)
>describe c;
Prints schema for c and d (but not e)
Adv - Can select which one of nestedAlias to describe.
Disadv - Extra typing.

Proposal 2:- Implicit describe (no describe nested statements)
>c = foreach b { d = order a by $0; e = ...; generate d.$0 ...;}
>describe c;
Describes c, d and e;
Adv- less typing
Disadv- extra prints
(2a -  describe c prints for c, d and e. Also describe c->d to describe nested 
d)
(2b -  describe c prints for c only. describe c-> d to describe nested d).

Alan/Olga, Let me know your comments on this,

> Make describe work with nested foreach
> --------------------------------------
>
>                 Key: PIG-972
>                 URL: https://issues.apache.org/jira/browse/PIG-972
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Olga Natkovich
>            Assignee: Aniket Mokashi
>             Fix For: 0.8.0
>
>
> Currently Parser can't deal with that. This is because describe is part of 
> Grunt parser while the rest of nested foreach is handled by the QueryParser

-- 
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