bowenliang123 commented on code in PR #7153:
URL: https://github.com/apache/iceberg/pull/7153#discussion_r1148373937


##########
spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/SparkSessionCatalog.java:
##########
@@ -50,8 +53,8 @@
  *
  * @param <T> CatalogPlugin class to avoid casting to TableCatalog and 
SupportsNamespaces.
  */
-public class SparkSessionCatalog<T extends TableCatalog & SupportsNamespaces> 
extends BaseCatalog
-    implements CatalogExtension {
+public class SparkSessionCatalog<T extends TableCatalog & FunctionCatalog & 
SupportsNamespaces>

Review Comment:
   Here makes the class T extends FunctionCatalog, and it is for the delegated 
session catalog (set via Sparks's `CatalogPlugin#setDelegateCatalog`), but not 
for the Iceberg's `SparkSessionCatalog` itself. This PR is mainly purposed for 
loading functions from the delegated session catalog, therefore, forcing to 
check it to be an instance of (or as) FunctionCatalog is necessary.



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