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

Gianmarco De Francisci Morales commented on PIG-2583:
-----------------------------------------------------

Probably it is fine anyway.
The order in which they are defined (and printed) will tell you that D got 
defined before A.

One use case I see for this history command is to build a Pig script 
interactively step by step.
The output of the history can be then copy-pasted to a file to save the script.
In this case you would need to repeat the D = ... statement anyway to get the 
correct order.
To do this for more than one statement you could simply use the output of 
history, and copy-paste it in grunt up to (excluding) the last A = ... 
statement.
                
> Add Grunt command to list the statements in cache
> -------------------------------------------------
>
>                 Key: PIG-2583
>                 URL: https://issues.apache.org/jira/browse/PIG-2583
>             Project: Pig
>          Issue Type: Improvement
>    Affects Versions: 0.10.0
>            Reporter: Daniel Dai
>            Assignee: Allan AvendaƱo
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.11
>
>         Attachments: gruntHistory.patch, gruntHistory1.patch
>
>
> It is convenient to list statements in cache:
> grunt> a = load '1.txt';         
> grunt> b = foreach a generate $0, $1;
> grunt> list
> a = load '1.txt';
> b = foreach a generate $0, $1;

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


Reply via email to