Skip to content

[doc](array)refresh array functions doc #2671

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

Merged
merged 5 commits into from
Aug 1, 2025

Conversation

amorynan
Copy link
Contributor

@amorynan amorynan commented Jul 28, 2025

Versions

  • dev
  • 3.0
  • 2.1
  • 2.0

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

- 整数类型(TINYINT、SMALLINT、INT、BIGINT、LARGEINT)
- 浮点类型(FLOAT、DOUBLE)
- 十进制类型(DECIMALV2、DECIMALV3,包括 DECIMAL32、DECIMAL64、DECIMAL128I、DECIMAL256)
- 如果数组包含其他类型(如字符串、日期等),会尝试将元素转换为 DOUBLE 类型。转换失败的元素结果为 null,不参与累积和。
Copy link
Contributor

Choose a reason for hiding this comment

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

这里,日期类型我们为什么要支持cast 成double啊?

- NULL:如果输入数组为 NULL

使用说明:
- 如果数组包含其他类型(如字符串、日期等),会尝试将元素转换为 DOUBLE 类型。转换失败的元素结果为 null,不参与差值计算。
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的null 为什么没有被按照0来计算?
另外,日期为什么要cast?

- 日期时间类型:DATE、DATETIME、DATEV2、DATETIMEV2
- 布尔类型:BOOLEAN
- IP 类型:IPV4、IPV6
- 复杂数据类型:ARRAY、MAP、STRUCT
Copy link
Contributor

Choose a reason for hiding this comment

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

对于复杂类型,比如map,我们是怎么判断两个map 相等的?

- 字符串类型:CHAR、VARCHAR、STRING
- 日期时间类型:DATE、DATETIME、DATEV2、DATETIMEV2
- 布尔类型:BOOLEAN
- IP 类型:IPV4、IPV6
Copy link
Contributor

Choose a reason for hiding this comment

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

我们不支持json 类型吗?

@amorynan amorynan requested a review from yiguolei August 1, 2025 06:14
@yiguolei yiguolei merged commit df5d41f into apache:master Aug 1, 2025
1 of 3 checks passed
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