wuwenchi commented on code in PR #5120:
URL: https://github.com/apache/iceberg/pull/5120#discussion_r922957372


##########
flink/v1.15/flink/src/main/java/org/apache/iceberg/flink/FlinkCatalog.java:
##########
@@ -161,19 +167,33 @@ public List<String> listDatabases() throws 
CatalogException {
         .collect(Collectors.toList());
   }
 
+  public void registerPartitionFunction(String databaseName) {
+    partitionFunctions.putIfAbsent(databaseName + ".buckets",
+        new CatalogFunctionImpl(PartitionTransformUdf.Bucket.class.getName(), 
FunctionLanguage.JAVA));
+    partitionFunctions.putIfAbsent(databaseName + ".truncates",
+        new 
CatalogFunctionImpl(PartitionTransformUdf.Truncate.class.getName(), 
FunctionLanguage.JAVA));
+  }
+
+  public void deregisterPartitionFunction(String databaseName) {
+    partitionFunctions.remove(databaseName + ".buckets");
+    partitionFunctions.remove(databaseName + ".truncates");
+  }
+

Review Comment:
   If the timing of registering functions is appropriate, these functions will 
be displayed in the listfunction later, and some test cases will be added.



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