Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/22894#discussion_r230556818 --- Diff: core/src/main/scala/org/apache/spark/scheduler/MapStatus.scala --- @@ -189,13 +188,12 @@ private[spark] class HighlyCompressedMapStatus private ( emptyBlocks.readExternal(in) avgSize = in.readLong() val count = in.readInt() - val hugeBlockSizesArray = mutable.ArrayBuffer[Tuple2[Int, Byte]]() + hugeBlockSizes = mutable.Map.empty[Int, Byte] (0 until count).foreach { _ => val block = in.readInt() val size = in.readByte() - hugeBlockSizesArray += Tuple2(block, size) + hugeBlockSizes.asInstanceOf[mutable.Map[Int, Byte]].update(block, size) --- End diff -- Why cast it? it is used as a mutable map and its type is a mutable map, so the type on line 151 is wrong. Also, just `hugeBlockSizes(block) = size`, no?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org