diff options
author | WeichenXu <WeichenXu123@outlook.com> | 2016-06-30 23:00:39 +0800 |
---|---|---|
committer | Cheng Lian <lian@databricks.com> | 2016-06-30 23:00:39 +0800 |
commit | 5344bade8efb6f12aa43fbfbbbc2e3c0c7d16d98 (patch) | |
tree | 28713a0ffef28c2f97c523c9f956911bfc3ee2d5 /python/pyspark/sql | |
parent | 5320adc863ca85b489cef79f156392b9da36e53f (diff) | |
download | spark-5344bade8efb6f12aa43fbfbbbc2e3c0c7d16d98.tar.gz spark-5344bade8efb6f12aa43fbfbbbc2e3c0c7d16d98.tar.bz2 spark-5344bade8efb6f12aa43fbfbbbc2e3c0c7d16d98.zip |
[SPARK-15820][PYSPARK][SQL] Add Catalog.refreshTable into python API
## What changes were proposed in this pull request?
Add Catalog.refreshTable API into python interface for Spark-SQL.
## How was this patch tested?
Existing test.
Author: WeichenXu <WeichenXu123@outlook.com>
Closes #13558 from WeichenXu123/update_python_sql_interface_refreshTable.
Diffstat (limited to 'python/pyspark/sql')
-rw-r--r-- | python/pyspark/sql/catalog.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/python/pyspark/sql/catalog.py b/python/pyspark/sql/catalog.py index 3033f147bc..4af930a3cd 100644 --- a/python/pyspark/sql/catalog.py +++ b/python/pyspark/sql/catalog.py @@ -232,6 +232,11 @@ class Catalog(object): """Removes all cached tables from the in-memory cache.""" self._jcatalog.clearCache() + @since(2.0) + def refreshTable(self, tableName): + """Invalidate and refresh all the cached metadata of the given table.""" + self._jcatalog.refreshTable(tableName) + def _reset(self): """(Internal use only) Drop all existing databases (except "default"), tables, partitions and functions, and set the current database to "default". |