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

Make interval multiply and divide's overflow behavior consisitent with other interval operations

    XMLWordPrintableJSON

Details

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

    Description

      The current behavior of interval multiply and divide follows the ANSI SQL standard when overflow, it is compatible with other interval operations when `spark.sql.ansi.enabled` is true, but not compatible when `spark.sql.ansi.enabled` is false.

      When `spark.sql.ansi.enabled` is false, as the factor is a double value, so we should use java's rounding or truncation behavior for casting double to integrals.

      Attachments

        Issue Links

          Activity

            People

              Qin Yao Kent Yao 2
              Qin Yao Kent Yao 2
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: