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

Pig 12.0 Documentation

    XMLWordPrintableJSON

    Details

    • Type: Wish
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.12.1, 0.13.0
    • Component/s: documentation
    • Labels:
      None

      Description

      I think the example for SAMPLE is wrong

      In this example, a scalar expression is used (it will sample approximately 1000 records from the input).

      a = load 'a.txt';
      b = group a all;
      c = foreach b generate COUNT(a) as num_rows;
      e = sample d 1000/num_rows;

      There is no relation d and I get a "Projected field [num_rows] does not exist in schema" error, I think it need to be
      e = sample a 1000/c.numrows

        Attachments

        1. PIG-3777-1.patch
          0.5 kB
          Jianyong Dai

          Activity

            People

            • Assignee:
              karinahauser Karina Hauser
              Reporter:
              karinahauser Karina Hauser
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.25h
                0.25h
                Remaining:
                Remaining Estimate - 0.25h
                0.25h
                Logged:
                Time Spent - Not Specified
                Not Specified