HyukjinKwon commented on a change in pull request #33388:
URL: https://github.com/apache/spark/pull/33388#discussion_r671222403



##########
File path: python/pyspark/sql/catalog.py
##########
@@ -133,6 +133,35 @@ def listColumns(self, tableName, dbName=None):
                 isBucket=jcolumn.isBucket()))
         return columns
 
+    def tableExists(self, tableName, dbName=None):
+        """Check if the table or view with the specified name exists.
+        This can either be a temporary view or a table/view.
+
+        .. versionadded:: 3.3.0
+
+        Parameters
+        ----------
+        tableName : string
+                    name of the table to check existence
+        dbName : string, optional
+                 name of the database to check table existence in.
+                 If no database is specified, the current database is used
+
+        Returns
+        -------
+        Boolean indicating whether the table/view exist
+
+        Examples
+        --------
+        >>> spark.catalog.tableExists("unexisting_table")

Review comment:
       The testing framework actually run these examples as tests. So the table 
would have to be created (and dropped to clean up)




-- 
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]

Reply via email to