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

Top UDF documentation indicates improper use

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.10.0
    • 0.12.0
    • documentation
    • None
    • Javadoc and pig tutorial

    Description

      The documentation in both the source code javadoc: http://svn.apache.org/repos/asf/pig/trunk/src/org/apache/pig/builtin/TOP.java and the Apache Pig Reference manual: http://pig.apache.org/docs/r0.8.1/piglatin_ref2.html#TOP indicates that the index that is passed to the TOP UDF should be 1-indexed.

      Reading the code and testing the results, this is false. Zero-indexing gives the correct behavior. Users should not be betrayed by the official documentation.

      Attachments

        1. PIG-3405.patch
          2 kB
          Aniket Namadeo Mokashi

        Activity

          People

            aniket486 Aniket Namadeo Mokashi
            keith.wyss Keith Wyss
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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