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

Sql Div operator can result in incorrect output for int_min

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.0
    • Fix Version/s: 3.0.0
    • Component/s: SQL
    • Labels:
      None

      Description

      Input in csv : -2147483648,-1 --> (_c0, _c1)

      val res = df.selectExpr("_c0 div _c1")
      res.collect
      res1: Array[org.apache.spark.sql.Row] = Array([-2147483648])
      

      The result should be 2147483648 instead.

        Attachments

          Activity

            People

            • Assignee:
              sandeep.katta2007 Sandeep Katta
              Reporter:
              kshukla Kuhu Shukla
            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: