Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
3.3.0
-
None
Description
https://github.com/apache/spark/pull/37478
- as-is
private fun config(builder: SparkSession.Builder): SparkSession.Builder { val map = YamlUtils.read(this::class.java, "spark", Extension.YAML) var b = builder map.keys.forEach { val k = it val v = map[k] b = when (v) { is Long -> b.config(k, v) is String -> b.config(k, v) is Double -> b.config(k, v) is Boolean -> b.config(k, v) else -> b } } return b } }
- to-be
private fun config(builder: SparkSession.Builder): SparkSession.Builder { val map = YamlUtils.read(this::class.java, "spark", Extension.YAML) return b.config(map) } }