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

CaseInsensitiveMap should be deterministic for addition

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.3, 2.2.3, 2.3.4, 2.4.6, 3.0.0
    • Fix Version/s: 2.4.7, 3.0.1, 3.1.0
    • Component/s: SQL
    • Labels:
      None

      Description

      import org.apache.spark.sql.catalyst.util.CaseInsensitiveMap
      var m = CaseInsensitiveMap(Map.empty[String, String])
      Seq(("paTh", "1"), ("PATH", "2"), ("Path", "3"), ("patH", "4"), ("path", "5")).foreach { kv =>
        m = (m + kv).asInstanceOf[CaseInsensitiveMap[String]]
        println(m.get("path"))
      }
      
      Some(1)
      Some(2)
      Some(3)
      Some(4)
      Some(1)
      

        Attachments

          Activity

            People

            • Assignee:
              dongjoon Dongjoon Hyun
              Reporter:
              girish_pandit Girish A Pandit
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: