티스토리 뷰

공부

[Scala] foreach Map

승가비 2022. 8. 31. 15:42
728x90
    def config(map: Map[String, Any]): Builder = synchronized {
      map.foreach {
        kv: (String, Any) => {
          options += kv._1 -> kv._2.toString
        }
      }
      this
    }

https://github.com/apache/spark/pull/37478

 

[SPARK-40163][SQL] feat: SparkSession.config(Map) by seunggabi · Pull Request #37478 · apache/spark

https://issues.apache.org/jira/browse/SPARK-40163 What changes were proposed in this pull request? as-is private fun config(builder: SparkSession.Builder): SparkSession.Builder { va...

github.com

https://stackoverflow.com/questions/8610776/scala-map-foreach

 

Scala Map foreach

given: val m = Map[String, Int]("a" -> 1, "b" -> 2, "c" -> 3) m.foreach((key: String, value: Int) => println(">>> key=" + key + ", value=" + value)) why does the compiler com...

stackoverflow.com

 

728x90

'공부' 카테고리의 다른 글

[java] array to list  (0) 2022.08.31
[scala] javaMap to scalaMap  (0) 2022.08.31
[MySQL] INSERT ... ON DUPLICATE KEY UPDATE ...  (0) 2022.08.31
[python] if some_string: (some_string is empty)  (0) 2022.08.31
[python] slack chat & files  (1) 2022.08.31
댓글