You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Thejas M Nair (JIRA)" <ji...@apache.org> on 2011/06/01 16:46:47 UTC

[jira] [Commented] (PIG-1926) Sample/Limit should take scalar

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

Thejas M Nair commented on PIG-1926:
------------------------------------

bq. Is there a consistent formatting template for Pig in order to make the patch more readable? (half of the modified lines are from the code formatter).
Officially, pig is supposed to follow the Oracle/Sun coding conventions - http://wiki.apache.org/pig/HowToContribute. But in that large list, only things like use of 4 tabs for indentation and limiting length of a line to around 80 chars is what is almost always followed. 
Can you please try to disable auto-formatting and format only the sections of code that you are changing (cmd-i in eclipse on mac)? Otherwise, it is difficult to distinguish between a real change and formatting change.


> Sample/Limit should take scalar
> -------------------------------
>
>                 Key: PIG-1926
>                 URL: https://issues.apache.org/jira/browse/PIG-1926
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Daniel Dai
>              Labels: gsoc2011
>         Attachments: PIG-1926.patch, PIG-1926.patch, PIG-1926.patch, PIG-1926.patch
>
>
> Currently, Limit, Sample only takes a constant. It would be better we can use a scalar in the place of constant. Eg:
> {code}
> a = load 'a.txt';
> b = group a all;
> c = foreach b generate COUNT(a) as sum;
> d = order a by $0;
> e = limit d c.sum/100;
> {code}
> This is a candidate project for Google summer of code 2011. More information about the program can be found at http://wiki.apache.org/pig/GSoc2011

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira