Github user cloud-fan commented on a diff in the pull request: https://github.com/apache/spark/pull/20292#discussion_r163149213 --- Diff: core/src/main/scala/org/apache/spark/util/collection/ExternalAppendOnlyMap.scala --- @@ -463,21 +463,21 @@ class ExternalAppendOnlyMap[K, V, C]( // An intermediate stream that reads from exactly one batch // This guards against pre-fetching and other arbitrary behavior of higher level streams - private var deserializeStream = nextBatchStream() + private var deserializeStream: Option[DeserializationStream] = None --- End diff -- can't we just use `null` as initial value? For performance critical places we don't need follow Scala style and use `None`.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org