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

Errors and lacks in document "User Defined Functions"

    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      This patch fixes following errors in the document "User Defined Functions".

      1. Malformed type parameters such as "List (FuncSpec)" and "new ArrayList (FuncSpec) ()"
      2. "Reporting Progress" subsection describes EvalFunc#progress, but the example program calls PigProgressable#progress. The program works, but it would be better to be consistent with the description calling EvalFunc#progress.
      3. Several sentences about LoadFunc and StoreFunc refer to the current load/store API as "the new API" such as "The meaning of putNext() has not changed ... - in the new API, this is the method ...". It is not good because the document is not about migration from the old API. The patch removes those words.
      4. "Passing Configurations to UDFs" subsection refers to "describeSchema" method, but it does not exist. The patch replaces it with "checkSchema" method.
      5. Updates links
      6. Fixes typos
        • "implemented in three five languages: Java, Python, JavaScript, Ruby and Groovy"
        • "The exact signature of the function should be clear from its documentation"
        • The EvalFunc function class provides a progress function
        • "Inside EvalFunc exec method, you can assume that these files already exist in distributed cache"
        • "throw new IOException(...);"
        • "throw newIOException new IOException (...);"
        • "throw new OException IOException (...);"
        • "to use the UPPER command function "
        • " Square square - Square of a number of any data type"
        • "ships the required scriptengine (js Rhino) to interpret it"

      The patch creates a new section "Using Short Names" including two subsections:

      • "Import Lists" moved from "Eval Functions": this subsection should be out of "Eval Functions", because import lists can be used for load/store functions, and the example program imports a load function.
      • "Defining Aliases" describing DEFINE statement: it seems good to explain the statement here, next to the description of import lists. DEFINE statement currently has not been referred from the document.

      Attachments

        1. PIG-3112.patch
          20 kB
          MIYAKAWA Taku

        Activity

          People

            miyakawataku MIYAKAWA Taku
            miyakawataku MIYAKAWA Taku
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: