Repository: spark Updated Branches: refs/heads/master b63938a8b -> d8220885c
[SPARK-11917][PYSPARK] Add SQLContext#dropTempTable to PySpark Author: Jeff Zhang <[email protected]> Closes #9903 from zjffdu/SPARK-11917. Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d8220885 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d8220885 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d8220885 Branch: refs/heads/master Commit: d8220885c492141dfc61e8ffb92934f2339fe8d3 Parents: b63938a 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:22 2015 -0800 ---------------------------------------------------------------------- python/pyspark/sql/context.py | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/d8220885/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]
