Github user superbobry commented on a diff in the pull request:
https://github.com/apache/spark/pull/19992#discussion_r157340550
--- Diff: core/src/main/scala/org/apache/spark/storage/StorageLevel.scala
---
@@ -132,6 +132,23 @@ class StorageLevel private(
override def hashCode(): Int = toInt * 41 + replication
+ /** Name of the storage level if it is predefined or [[None]] otherwise.
*/
+ def name: Option[String] = this match {
--- End diff --
This sounds good, will do. A slightly unrelated point: I feel that the name
`fromString` somehow implies that it's the opposite of `toString`. What do you
think about renaming it to `fromName` now that we have `name`?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]