Why Spark doesn't allow map-side combining with array keys?
问题 I'm using Spark 1.3.1 and I'm curious why Spark doesn't allow using array keys on map-side combining. Piece of combineByKey function : if (keyClass.isArray) { if (mapSideCombine) { throw new SparkException("Cannot use map-side combining with array keys.") } } 回答1: Basically for the same reason why default partitioner cannot partition array keys. Scala Array is just a wrapper around Java array and its hashCode doesn't depend on a content: scala> val x = Array(1, 2, 3) x: Array[Int] = Array(1,