laserninja commented on code in PR #10494:
URL: https://github.com/apache/gravitino/pull/10494#discussion_r2989376640


##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoMetadata.java:
##########
@@ -715,12 +709,16 @@ public Collection<LanguageFunction> getLanguageFunctions(
     if (!catalogConnectorMetadata.supportsFunctions()) {
       return List.of();
     }
-    Function function =
-        catalogConnectorMetadata.getFunction(name.getSchemaName(), 
name.getFunctionName());
-    if (function == null) {
+    try {
+      Function function =
+          catalogConnectorMetadata.getFunction(name.getSchemaName(), 
name.getFunctionName());
+      if (function == null) {
+        return List.of();
+      }
+      return toLanguageFunctions(function);
+    } catch (NoSuchFunctionException e) {

Review Comment:
   Added `LOG.debug("Function {} not found in schema {}", ...)` in the 
`NoSuchFunctionException` catch block of `getLanguageFunctions`, along with the 
Logger field and imports.



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

Reply via email to