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

Risky apply() in OpenHashMap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.6.0
    • 1.6.2, 2.0.0
    • Spark Core
    • None

    Description

      It might confuse the future developers when they use OpenHashMap.apply() with a numeric value type.

      null.asInstance[Int], null.asInstance[Long], null.asInstace[Float] and null.asInstance[Double] will return 0/0.0/0L, which might confuse the developer if the value set contains 0/0.0/0L with an existing key

      Attachments

        Activity

          People

            codingcat Nan Zhu
            codingcat Nan Zhu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: