Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-35161 Error-handling SQL functions for ANSI SQL mode migration
  3. SPARK-40222

Numeric try_add/try_divide/try_subtract/try_multiply should throw error from their children

    XMLWordPrintableJSON

Details

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

    Description

      Similar to https://issues.apache.org/jira/browse/SPARK-40054, we should refactor the try_add/try_subtract/try_multiply/try_divide functions so that the errors from their children will be shown instead of ignored.
       Spark SQL allows arithmetic operations between Number/Date/Timestamp/CalendarInterval/AnsiInterval (see the rule ResolveBinaryArithmetic for details). Some of these combinations can throw exceptions too: * Date + CalendarInterval

      • Date + AnsiInterval
      • Timestamp + AnsiInterval
      • Date - CalendarInterval
      • Date - AnsiInterval
      • Timestamp - AnsiInterval
      • Number * CalendarInterval
      • Number * AnsiInterval
      • CalendarInterval / Number
      • AnsiInterval / Number

      This Jira is for the cases when both input data types are numbers.

       

       

      Attachments

        Activity

          People

            Gengliang.Wang Gengliang Wang
            Gengliang.Wang Gengliang Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: