Skip to content

Conversation

@lzshlzsh
Copy link
Contributor

No description provided.

* 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> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为什么后缀是 1 呢?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

示例代码,Row的内容具体化了。如果用户的 Row 内容不一样,需要用户开发一个 2、3 之类的。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议更新一下 README.md,增加 ArrayAgg 类函数的说明

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
Copy link
Collaborator

@kylemeow kylemeow Oct 11, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

项目不是 Apache 名下,无需添加这个 License Header

Copy link
Contributor Author

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 基类. */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码借鉴了开源的 Flink,需要加上出处说明(credits)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有道理

Copy link
Collaborator

@kylemeow kylemeow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kylemeow kylemeow merged commit 8d1e12a into tencentyun:master Oct 19, 2022
@lzshlzsh lzshlzsh deleted the array_agg branch March 31, 2023 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants