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



##########
File path: python/pyspark/sql/tests/test_catalog.py
##########
@@ -200,6 +200,18 @@ def test_list_columns(self):
                     "does_not_exist",
                     lambda: spark.catalog.listColumns("does_not_exist"))
 
+    def test_table_exists(self):

Review comment:
       Let's add a comment here (see "Pull Requests" at 
https://spark.apache.org/contributing.html

##########
File path: python/pyspark/sql/tests/test_catalog.py
##########
@@ -200,6 +200,18 @@ def test_list_columns(self):
                     "does_not_exist",
                     lambda: spark.catalog.listColumns("does_not_exist"))
 
+    def test_table_exists(self):
+        spark = self.spark
+        with self.database("some_db"):
+            spark.sql("CREATE DATABASE some_db")
+            with self.table("tab1", "some_db.tab2"):
+                self.assertFalse(spark.catalog.tableExists("tab1"))
+                self.assertFalse(spark.catalog.tableExists("tab2", "some_db"), 
[])

Review comment:
       ```suggestion
                   self.assertFalse(spark.catalog.tableExists("tab2", 
"some_db"))
   ```
   Mistake?




-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to