Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/11502#discussion_r55108022
--- Diff: core/src/main/scala/org/apache/spark/storage/BlockManager.scala
---
@@ -744,7 +750,7 @@ private[spark] class BlockManager(
level: StorageLevel,
tellMaster: Boolean = true,
effectiveStorageLevel: Option[StorageLevel] = None,
- keepReadLock: Boolean = false): Option[PutResult] = {
+ keepReadLock: Boolean = false): Option[Option[Iterator[Any]]] = {
--- End diff --
I checked the callsites. Currently we never actually use the inner level of
option. The only place where we look at the `Some` value is in
`getOrElseUpdate`. There we just do `x.get.get` anyway, so this can just be an
`Option[Iterator[Any]]`.
If there's another boolean that we need to return, then I would just make a
private case class even if it's called in only 1 place. Right now it's unclear
what `Some(None)` means, for example. Anything we can think of here is better
than nested options.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]