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

Possible overflow in long = int * int

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3.0
    • 2.4.0
    • Spark Core, SQL
    • None

    Description

      To perform `int * int` and then to cast to `long` may cause overflow if the MSB of the multiplication result is `1`. In other words, the result would be negative due to sign extension.

      Attachments

        Activity

          People

            kiszk Kazuaki Ishizaki
            kiszk Kazuaki Ishizaki
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: