Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13663

Create UDFs using existing functions in Hive instead from JAR files

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: UDF
    • Labels:

      Description

      Recently i came across
      FIRST_DAY_OF_YEAR UDF in SQL which returns Jan 1st of that year.

      This could be made simply using existing functions in Hive as
      suppose our input date is '2016-03-04'
      concat(Year('2016-03-04'),'-01-01')

      instead of loading a JAR file. And moreover i guess using JAR has less performance when compared to the above implementation.

      We can also use UDFs for hiding complex functions from our query which makes it more readable.

      Kindly let me know if i'm wrong about performance.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jdere Jason Dere
                Reporter:
                Nuthan Reddy Nuthan Reddy Gantla
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: