ueshin commented on code in PR #40015:
URL: https://github.com/apache/spark/pull/40015#discussion_r1163280656
##########
python/pyspark/sql/catalog.py:
##########
@@ -917,25 +919,34 @@ def isCached(self, tableName: str) -> bool:
"""
return self._jcatalog.isCached(tableName)
- def cacheTable(self, tableName: str) -> None:
- """Caches the specified table in-memory.
+ def cacheTable(self, tableName: str, storageLevel: Optional[StorageLevel]
= None) -> None:
+ """Caches the specified table in-memory or with given storage level.
+ Default MEMORY_AND_DISK.
.. versionadded:: 2.0.0
Parameters
----------
tableName : str
name of the table to get.
+ storageLevel : :class:`StorageLevel`
+ storage level to set for persistence.
.. versionchanged:: 3.4.0
Allow ``tableName`` to be qualified with catalog name.
+ .. versionchanged:: 3.5.0
+ Allow to specify storage level.
Review Comment:
```suggestion
tableName : str
name of the table to get.
.. versionchanged:: 3.4.0
Allow ``tableName`` to be qualified with catalog name.
storageLevel : :class:`StorageLevel`
storage level to set for persistence.
.. versionchanged:: 3.5.0
Allow to specify storage level.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]