HyukjinKwon commented on a change in pull request #20658: [SPARK-23488][python] 
Add missing catalog methods to python API
URL: https://github.com/apache/spark/pull/20658#discussion_r245190685
 
 

 ##########
 File path: python/pyspark/sql/catalog.py
 ##########
 @@ -138,6 +139,78 @@ def listColumns(self, tableName, dbName=None):
                 isBucket=jcolumn.isBucket()))
         return columns
 
+    @ignore_unicode_prefix
+    @since(3.0)
+    def databaseExists(self, dbName):
+        """Check if the database with the specified name exists."""
+        return self._jcatalog.databaseExists(dbName)
+
+    @ignore_unicode_prefix
+    @since(3.0)
+    def functionExists(self, functionName, dbName=None):
 
 Review comment:
   Hm, this signature looks different with Scala side:
   
   ```scala
     def functionExists(functionName: String): Boolean
     def functionExists(dbName: String, functionName: String): Boolean
   ```
   
   Can we handle this? There're some examples to refer, for instance,
   
   
https://github.com/apache/spark/blob/ecaa495b1fe532c36e952ccac42f4715809476af/python/pyspark/sql/dataframe.py#L811-L846

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to