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

IsEmpty documentation error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.15.0
    • 0.16.0
    • documentation
    • None

    Description

      http://pig.apache.org/docs/r0.15.0/func.html#isempty

      The documentation example uses a left outer join, but this produces a flat tuple, which is invalid for IsEmpty. I believe the example in the docs should be:

      SSN = load 'ssn.txt' using PigStorage() as (ssn:long);
      
      SSN_NAME = load 'students.txt' using PigStorage() as (ssn:long, name:chararray);
      
      /* do a cogroup of SSN with SSN_Name */
      X = COGROUP SSN by ssn, SSN_NAME by ssn;
      
      /* only keep those ssn's for which there is no name */
      Y = filter X by IsEmpty(SSN_NAME);
      

      Attachments

        1. PIG-4721.patch
          0.6 kB
          Daniel Dai

        Activity

          People

            nsmith Nathan Smith
            nsmith Nathan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: