Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/3039#discussion_r19700892
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala ---
@@ -267,6 +267,23 @@ class SQLContext(@transient val sparkContext:
SparkContext)
}
/**
+ * Unregisters the temporary table with the given table name in the
catalog. If the table has been
+ * cached/persisted before, it can be unpersisted if required.
+ *
+ * @param tableName the name of the table to be unregistered.
+ * @param unpersist whether to unpersist the table if it has been
cached/persisted before.
+ *
+ * @group userf
+ */
+ def unregisterTempTable(tableName: String, unpersist: Boolean = false):
Unit = {
--- End diff --
Yeah, I think for now we should just remove the cache no matter what.
Eventually we'll probably add names to the cached data so we can provide clear
semantics here, but I think its a pretty uncommon case to cache the same data
twice under two names and then uncache one of them.
Also, I wasn't arguing we should change the name of the function. I think
its good to have symmetry with register/unregister. I was wondering if we
could have SQL DDL for this same operation since we already have DDL for
creating cached tables.
---
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]