snuyanzin commented on code in PR #23796:
URL: https://github.com/apache/flink/pull/23796#discussion_r1404835126


##########
docs/content.zh/docs/dev/table/functions/udfs.md:
##########
@@ -1282,7 +1282,7 @@ public static class WeightedAvg extends 
AggregateFunction<Long, WeightedAvgAccum
 
 // 注册函数
 StreamTableEnvironment tEnv = ...
-tEnv.registerFunction("wAvg", new WeightedAvg());
+tEnv.createTemporarySystemFunction("wAvg", new WeightedAvg());

Review Comment:
   in fact both options are possible since there are both methods in 
`TableEnvironment` interface
   
https://github.com/apache/flink/blob/9d92104f7554a46eeaabf8622ae6670555eb2ad4/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java#L469-L470
   and
   
https://github.com/apache/flink/blob/9d92104f7554a46eeaabf8622ae6670555eb2ad4/flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableEnvironment.java#L493
   
   however agree it is better to follow the same pattern in both doc versions



-- 
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-unsubscr...@flink.apache.org

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

Reply via email to