-
Notifications
You must be signed in to change notification settings - Fork 6
[udf] Add udagg ARRAY_AGG base class and examples #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| * ARRAY_AGG 示例:数据类型为 {@code Row<f1 bigint, f2 string>}. 使用方法:{@code CREATE TEMPORARY SYSTEM | ||
| * FUNCTION ARRAY_AGG AS 'com.tencent.cloud.oceanus.udf.RowArrayAgg1' LANGUAGE JAVA;} | ||
| */ | ||
| public class RowArrayAgg1 extends ArrayAgg<RowData> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么后缀是 1 呢?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
示例代码,Row的内容具体化了。如果用户的 Row 内容不一样,需要用户开发一个 2、3 之类的。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议更新一下 README.md,增加 ArrayAgg 类函数的说明
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
请问有不限制ROW内容个数的自定义UDF吗?这个增加太麻烦了
| @@ -0,0 +1,158 @@ | |||
| /* | |||
| * Licensed to the Apache Software Foundation (ASF) under one | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
项目不是 Apache 名下,无需添加这个 License Header
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idea 自动配置的
| import java.util.List; | ||
| import java.util.Objects; | ||
|
|
||
| /** ARRAY_AGG 基类. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
代码借鉴了开源的 Flink,需要加上出处说明(credits)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
有道理
kylemeow
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.