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

[Piggybank] Add UDFs to check if a String is an Integer And if a String is Numeric

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.11
    • piggybank
    • None
    • Patch Available
    • Reviewed
    • Piggybank, IsInt, IsNumeric

    Description

      UDF that could be used to check if a String is numeric (or an Integer). Several tools such as Splunk, AbInitio have this UDF built-in and companies making an effort to move to Hadoop/Pig could use this.

      Use Case:
      In raw logs there are certain filters/conditions applied based on whether a particular field/value is numeric or not. For eg, SPLIT A INTO CATEGORY1 IF IsInt($0), CATEGORY2 IF !IsInt($0);

      Attachments

        1. PIG-2443.patch
          17 kB
          Prashant Kommireddi
        2. PIG-2443.2.patch
          26 kB
          Prashant Kommireddi
        3. isIntNumeric.patch
          5 kB
          Prashant Kommireddi
        4. isIntNumeric.patch
          6 kB
          Prashant Kommireddi

        Activity

          People

            prkommireddi Prashant Kommireddi
            prkommireddi Prashant Kommireddi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: