You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "jerry-024 (via GitHub)" <gi...@apache.org> on 2025/05/19 02:05:12 UTC

Re: [PR] [core] support function: add engine support function [paimon]

jerry-024 commented on code in PR #5604:
URL: https://github.com/apache/paimon/pull/5604#discussion_r2094726769


##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/FlinkCatalog.java:
##########
@@ -1460,40 +1471,111 @@ public final void alterPartition(
 
     @Override
     public final List<String> listFunctions(String dbName) throws CatalogException {
-        return Collections.emptyList();
+        try {
+            return catalog.listFunctions(dbName);
+        } catch (Catalog.DatabaseNotExistException e) {
+            throw new CatalogException(e.getMessage(), e);
+        }
     }
 
     @Override
     public final CatalogFunction getFunction(ObjectPath functionPath)
             throws FunctionNotExistException, CatalogException {
-        throw new FunctionNotExistException(getName(), functionPath);
+        try {
+            org.apache.paimon.function.Function function =
+                    catalog.getFunction(toIdentifier(functionPath));
+            FunctionDefinition functionDefinition = function.definition(FUNCTION_DEFINITION_NAME);
+            if (functionDefinition instanceof FunctionDefinition.FileFunctionDefinition) {
+                FunctionDefinition.FileFunctionDefinition fileFunctionDefinition =
+                        (FunctionDefinition.FileFunctionDefinition) functionDefinition;
+                List<ResourceUri> resourceUris =
+                        fileFunctionDefinition.storagePaths().stream()

Review Comment:
   fixme: check file type and language?



-- 
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: issues-unsubscribe@paimon.apache.org

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