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

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.11
    • Component/s: piggybank
    • Labels:
      None
    • Patch Info:
      Patch Available
    • Hadoop Flags:
      Reviewed
    • Tags:
      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. isIntNumeric.patch
          5 kB
          Prashant Kommireddi
        2. isIntNumeric.patch
          6 kB
          Prashant Kommireddi
        3. PIG-2443.patch
          17 kB
          Prashant Kommireddi
        4. PIG-2443.2.patch
          26 kB
          Prashant Kommireddi

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: