Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/10215#discussion_r47681732
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
@@ -698,47 +733,47 @@ class Dataset[T] private[sql](
def takeAsList(num: Int): java.util.List[T] =
java.util.Arrays.asList(take(num) : _*)
/**
- * Persist this [[Dataset]] with the default storage level
(`MEMORY_AND_DISK`).
- * @since 1.6.0
- */
+ * Persist this [[Dataset]] with the default storage level
(`MEMORY_AND_DISK`).
+ * @since 1.6.0
+ */
def persist(): this.type = {
sqlContext.cacheManager.cacheQuery(this)
this
}
/**
- * Persist this [[Dataset]] with the default storage level
(`MEMORY_AND_DISK`).
- * @since 1.6.0
- */
+ * Persist this [[Dataset]] with the default storage level
(`MEMORY_AND_DISK`).
+ * @since 1.6.0
+ */
def cache(): this.type = persist()
/**
- * Persist this [[Dataset]] with the given storage level.
- * @param newLevel One of: `MEMORY_ONLY`, `MEMORY_AND_DISK`,
`MEMORY_ONLY_SER`,
- * `MEMORY_AND_DISK_SER`, `DISK_ONLY`, `MEMORY_ONLY_2`,
- * `MEMORY_AND_DISK_2`, etc.
- * @group basic
- * @since 1.6.0
- */
+ * Persist this [[Dataset]] with the given storage level.
+ * @param newLevel One of: `MEMORY_ONLY`, `MEMORY_AND_DISK`,
`MEMORY_ONLY_SER`,
+ * `MEMORY_AND_DISK_SER`, `DISK_ONLY`, `MEMORY_ONLY_2`,
+ * `MEMORY_AND_DISK_2`, etc.
+ * @group basic
+ * @since 1.6.0
+ */
def persist(newLevel: StorageLevel): this.type = {
sqlContext.cacheManager.cacheQuery(this, None, newLevel)
this
}
/**
- * Mark the [[Dataset]] as non-persistent, and remove all blocks for it
from memory and disk.
- * @param blocking Whether to block until all blocks are deleted.
- * @since 1.6.0
- */
+ * Mark the [[Dataset]] as non-persistent, and remove all blocks for it
from memory and disk.
+ * @param blocking Whether to block until all blocks are deleted.
+ * @since 1.6.0
+ */
def unpersist(blocking: Boolean): this.type = {
sqlContext.cacheManager.tryUncacheQuery(this, blocking)
this
}
/**
- * Mark the [[Dataset]] as non-persistent, and remove all blocks for it
from memory and disk.
- * @since 1.6.0
- */
--- End diff --
So sorry for introducing these inconsistency. Undo the changes.
---
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]