You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Gianmarco De Francisci Morales (JIRA)" <ji...@apache.org> on 2011/06/21 10:15:47 UTC

[jira] [Created] (PIG-2136) Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression

Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression
-----------------------------------------------------------------------------------------

                 Key: PIG-2136
                 URL: https://issues.apache.org/jira/browse/PIG-2136
             Project: Pig
          Issue Type: Bug
            Reporter: Gianmarco De Francisci Morales
            Assignee: Gianmarco De Francisci Morales
            Priority: Minor


Currently LogicalPlanBuilder uses a filter with 'Math.random() <= const' to implement Sample.
Actually it should use 'Math.random() < const' to be correct, because Math.random() generates a number 0 <= x < 1

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

        

[jira] [Updated] (PIG-2136) Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression

Posted by "Gianmarco De Francisci Morales (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gianmarco De Francisci Morales updated PIG-2136:
------------------------------------------------

    Attachment: PIG-2136.patch

> Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2136
>                 URL: https://issues.apache.org/jira/browse/PIG-2136
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Gianmarco De Francisci Morales
>            Assignee: Gianmarco De Francisci Morales
>            Priority: Minor
>         Attachments: PIG-2136.patch
>
>
> Currently LogicalPlanBuilder uses a filter with 'Math.random() <= const' to implement Sample.
> Actually it should use 'Math.random() < const' to be correct, because Math.random() generates a number 0 <= x < 1

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

        

[jira] [Updated] (PIG-2136) Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression

Posted by "Gianmarco De Francisci Morales (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gianmarco De Francisci Morales updated PIG-2136:
------------------------------------------------

    Status: Patch Available  (was: Open)

> Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2136
>                 URL: https://issues.apache.org/jira/browse/PIG-2136
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Gianmarco De Francisci Morales
>            Assignee: Gianmarco De Francisci Morales
>            Priority: Minor
>         Attachments: PIG-2136.patch
>
>
> Currently LogicalPlanBuilder uses a filter with 'Math.random() <= const' to implement Sample.
> Actually it should use 'Math.random() < const' to be correct, because Math.random() generates a number 0 <= x < 1

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

        

[jira] [Updated] (PIG-2136) Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression

Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/PIG-2136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thejas M Nair updated PIG-2136:
-------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

+1 . Patch committed to trunk. Thanks Gianmarco !


> Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression
> -----------------------------------------------------------------------------------------
>
>                 Key: PIG-2136
>                 URL: https://issues.apache.org/jira/browse/PIG-2136
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Gianmarco De Francisci Morales
>            Assignee: Gianmarco De Francisci Morales
>            Priority: Minor
>         Attachments: PIG-2136.patch
>
>
> Currently LogicalPlanBuilder uses a filter with 'Math.random() <= const' to implement Sample.
> Actually it should use 'Math.random() < const' to be correct, because Math.random() generates a number 0 <= x < 1

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