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

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0
    • Fix Version/s: 2.4.0
    • Component/s: SQL
    • Labels:
      None
    • Target Version/s:

      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

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

              Dates

              • Created:
                Updated:
                Resolved: