Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2136

Implementation of Sample should use LessThanExpression instead of LessThanEqualExpression

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      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

        Attachments

        1. PIG-2136.patch
          3 kB
          Gianmarco De Francisci Morales

          Activity

            People

            • Assignee:
              azaroth Gianmarco De Francisci Morales
              Reporter:
              azaroth Gianmarco De Francisci Morales
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: