Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/13989#discussion_r69090124
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala ---
@@ -2307,6 +2307,19 @@ class Dataset[T] private[sql](
def distinct(): Dataset[T] = dropDuplicates()
/**
+ * Refreshes the metadata and data cached in Spark for data associated
with this Dataset.
+ * An example use case is to invalidate the file system metadata cached
by Spark, when the
+ * underlying files have been updated by an external process.
+ *
+ * @group action
+ * @since 2.0.0
+ */
+ def refresh(): Unit = {
+ unpersist(false)
--- End diff --
We can unpersist, but should persist it again immediately.
---
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]