Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-40182 Improve ANSI runtime error messages
  3. SPARK-39889

Use different error classes for numeric/interval divided by 0

    XMLWordPrintableJSON

Details

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

    Description

      Currently, when numbers are divided by 0 under ANSI mode, the error message is like

      [DIVIDE_BY_ZERO] Division by zero. Use `try_divide` to tolerate divisor being 0 and return NULL instead. If necessary set "ansi_mode" to "false" (except for ANSI interval type) to bypass this error.

      The "(except for ANSI interval type)" part is confusing.  We should remove it and have a new error class "INTERVAL_DIVIDED_BY_ZERO"

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: