Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-23899 Built-in SQL Function Improvement
  3. SPARK-23902

Provide an option in months_between UDF to disable rounding-off

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • SQL
    • None

    Description

      https://issues.apache.org/jira/browse/HIVE-15511

      Rounding off was added in {{GenericUDFMonthsBetween}} so that it can be compatible with systems like oracle. However, there are places where rounding off is not needed.
      
      E.g "CAST(MONTHS_BETWEEN(l_shipdate, l_commitdate) / 12 AS INT)" may not need rounding off via BigDecimal which is compute intensive.
      

      Attachments

        Activity

          People

            mgaido Marco Gaido
            smilegator Xiao Li
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: