Skip to content
Snippets Groups Projects
Commit 5344bade authored by WeichenXu's avatar WeichenXu Committed by Cheng Lian
Browse files

[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.
parent 5320adc8
No related branches found
No related tags found
No related merge requests found
......@@ -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".
......
......@@ -214,7 +214,7 @@ abstract class Catalog {
def clearCache(): Unit
/**
* Invalidate and refresh all the cached the metadata of the given table. For performance reasons,
* Invalidate and refresh all the cached metadata of the given table. For performance reasons,
* Spark SQL or the external data source library it uses might cache certain metadata about a
* table, such as the location of blocks. When those change outside of Spark SQL, users should
* call this function to invalidate the cache.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment