Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-32021

make_interval does not accept seconds >100

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.1, 3.1.0
    • SQL
    • None

    Description

      In make_interval(years, months, weeks, days, hours, mins, secs), secs are defined as Decimal(8, 6), which turns into null if the value of the expression overflows 100 seconds.
      Larger seconds values should be allowed.

      This has been reported by Simba, who wants to use make_interval to implement translation for TIMESTAMP_ADD ODBC function in Spark 3.0.
      ODBC

      {fn TIMESTAMPADD(SECOND, integer_exp, timestamp}

      fails when integer_exp returns seconds values >= 100.

      Attachments

        Activity

          People

            maxgekk Max Gekk
            juliuszsompolski Juliusz Sompolski
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: