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

Pig documentation on TOP funcation has issues

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9.2
    • 0.11
    • documentation
    • None
    • Reviewed

    Description

      The following documentation gives a picture that the columns are indexed from 1 but is actually indexed from 0.

      http://pig.apache.org/docs/r0.8.1/piglatin_ref2.html#TOP

      Specifically on the sample code snippet
      result = TOP(10, 2, C); // and retain top 10 occurrences of 'second' in first

      'second' is the second column, in that case we need to have the TOP function as TOP(10, 1, C) instead of TOP(10, 2, C)

      Attachments

        1. PIG-2714-1.patch
          0.6 kB
          Daniel Dai

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            daijy Daniel Dai
            bejoyks Bejoy KS
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment