Repository: spark
Updated Branches:
  refs/heads/branch-1.6 6c31c20ea -> 5c3a9dfa6


[SPARK-11917][PYSPARK] Add SQLContext#dropTempTable to PySpark

Author: Jeff Zhang <[email protected]>

Closes #9903 from zjffdu/SPARK-11917.

(cherry picked from commit d8220885c492141dfc61e8ffb92934f2339fe8d3)
Signed-off-by: Reynold Xin <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5c3a9dfa
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5c3a9dfa
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5c3a9dfa

Branch: refs/heads/branch-1.6
Commit: 5c3a9dfa64ecec4775e1508c45cf46bf75a548bd
Parents: 6c31c20
Author: Jeff Zhang <[email protected]>
Authored: Thu Nov 26 19:15:22 2015 -0800
Committer: Reynold Xin <[email protected]>
Committed: Thu Nov 26 19:15:42 2015 -0800

----------------------------------------------------------------------
 python/pyspark/sql/context.py | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/5c3a9dfa/python/pyspark/sql/context.py
----------------------------------------------------------------------
diff --git a/python/pyspark/sql/context.py b/python/pyspark/sql/context.py
index a49c1b5..b05aa2f 100644
--- a/python/pyspark/sql/context.py
+++ b/python/pyspark/sql/context.py
@@ -445,6 +445,15 @@ class SQLContext(object):
         else:
             raise ValueError("Can only register DataFrame as table")
 
+    @since(1.6)
+    def dropTempTable(self, tableName):
+        """ Remove the temp table from catalog.
+
+        >>> sqlContext.registerDataFrameAsTable(df, "table1")
+        >>> sqlContext.dropTempTable("table1")
+        """
+        self._ssql_ctx.dropTempTable(tableName)
+
     def parquetFile(self, *paths):
         """Loads a Parquet file, returning the result as a :class:`DataFrame`.
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to