Skip to content
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

[Doc] Add array functions #1907

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

xyfsjq
Copy link
Contributor

@xyfsjq xyfsjq commented Jan 22, 2025

Versions

  • dev
  • 3.0
  • 2.1
  • 2.0

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

Comment on lines 40 to 44
ARRAY_RANGE(end)
ARRAY_RANGE(start, end)
ARRAY_RANGE(start, end, step)
ARRAY_RANGE(start_datetime, end_datetime)
ARRAY_RANGE(start_datetime, end_datetime, INTERVAL interval_step UNIT)
Copy link
Contributor

Choose a reason for hiding this comment

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

参数需要加尖括号

## Syntax

```sql
ARRAY_REPEAT(<T>, <n>)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ARRAY_REPEAT(<T>, <n>)
ARRAY_REPEAT(<element>, <n>)


```sql
ARRAY<T> array_shuffle(ARRAY<T> array1, [INT seed])
ARRAY<T> shuffle(ARRAY<T> array1, [INT seed])
ARRAY_SHUFFLE(<array1>, <seed>)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ARRAY_SHUFFLE(<array1>, <seed>)
ARRAY_SHUFFLE(<array>, <seed>)


```sql
ARRAY_UNION(<array1>, <array2>)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ARRAY_UNION(<array1>, <array2>)
ARRAY_UNION(<array> [, <array> ] )

Comment on lines 42 to 43
| `<array1>` | The array to be merged |
| `<array2>` | The array to be merged |
Copy link
Contributor

Choose a reason for hiding this comment

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

写一个 <array> 就可以了


```sql
ARRAY<T> array_with_constant(n, T)
ARRAY<T> array_repeat(T, n)
ARRAY_WITH_CONSTANT(<n>, <T>)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ARRAY_WITH_CONSTANT(<n>, <T>)
ARRAY_WITH_CONSTANT(<n>, <element>)

Comment on lines 40 to 41
| `<array1>` | The array to be merged |
| `<array2>` | The array to be merged |
Copy link
Contributor

Choose a reason for hiding this comment

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

这个说明看起来不太对

Comment on lines 42 to 43
| `<arr>` | The array to be judged |
| `<value>` | Elements to be judged |
Copy link
Contributor

Choose a reason for hiding this comment

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

这个说明不太明确

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants