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

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.1.0
    • Fix Version/s: 3.0.0
    • Component/s: SQL
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: