This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git
The following commit(s) were added to refs/heads/master by this push:
new 53fb5458c14 [fix](doc) replace non-existent array_length with
array_size in array-count example (#3781)
53fb5458c14 is described below
commit 53fb5458c146beb9c4556e0108fbca0acb3ece1e
Author: boluor <[email protected]>
AuthorDate: Mon May 25 13:01:48 2026 -0700
[fix](doc) replace non-existent array_length with array_size in array-count
example (#3781)
## Summary
The \`array-count\` page on EN current/dev and version-4.x contained an
example referencing \`array_length(x)\`, which is not a registered
function in Doris. Verified in
[\`fe/fe-core/.../BuiltinScalarFunctions.java#L703\`](https://github.com/apache/doris/blob/master/fe/fe-core/src/main/java/org/apache/doris/catalog/BuiltinScalarFunctions.java#L703):
\`\`\`java
scalar(Cardinality.class, \"array_size\", \"cardinality\", \"size\"),
\`\`\`
\`array_size\` is the canonical name; \`cardinality\` and \`size\` are
aliases. \`array_length\` was never registered, so the example as
written would fail at analysis time with \"unknown function\". Verified
identical on \`branch-3.1\`, \`branch-4.0\`, \`branch-4.1\`, and
\`master\`.
## Scope
Two EN files (zh and 3.x/2.1 versions don't carry this example block):
-
\`docs/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md\`
-
\`versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md\`
Changes per file (lines 160-165 of the affected block):
- \`array_length(x)\` → \`array_size(x)\` in the SQL and the column
header
- Re-flow the result-table borders from 50 dashes to 64 to match the
actual 62-character column-header width (the existing borders were
already too narrow to contain the header — a separate pre-existing
formatting bug fixed in passing)
## Test plan
- [x] Source-of-truth verified across all maintained release branches
(3.1, 4.0, 4.1, master) — \`array_length\` is not registered anywhere
- [x] Dead-link check passes
- [x] Output table borders now align with column-header width
---
.../scalar-functions/array-functions/array-count.md | 12 ++++++------
.../scalar-functions/array-functions/array-count.md | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
index f5e4a453125..803142af5c4 100644
---
a/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
+++
b/docs/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
@@ -157,12 +157,12 @@ SELECT array_count((x, y) -> x > y, [1, 2, 3], [0, 3, 2]);
Complex type example - count arrays with more than 2 elements:
```sql
-SELECT array_count(x -> array_length(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]);
-+--------------------------------------------------+
-| array_count(x -> array_length(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]) |
-+--------------------------------------------------+
-| 2 |
-+--------------------------------------------------+
+SELECT array_count(x -> array_size(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]);
++----------------------------------------------------------------+
+| array_count(x -> array_size(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]) |
++----------------------------------------------------------------+
+| 2 |
++----------------------------------------------------------------+
```
Nested higher-order function example - count arrays that contain elements
greater than 5:
diff --git
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
index f5e4a453125..803142af5c4 100644
---
a/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
+++
b/versioned_docs/version-4.x/sql-manual/sql-functions/scalar-functions/array-functions/array-count.md
@@ -157,12 +157,12 @@ SELECT array_count((x, y) -> x > y, [1, 2, 3], [0, 3, 2]);
Complex type example - count arrays with more than 2 elements:
```sql
-SELECT array_count(x -> array_length(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]);
-+--------------------------------------------------+
-| array_count(x -> array_length(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]) |
-+--------------------------------------------------+
-| 2 |
-+--------------------------------------------------+
+SELECT array_count(x -> array_size(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]);
++----------------------------------------------------------------+
+| array_count(x -> array_size(x) > 2, [[1,2],[1,2,3],[4,5,6,7]]) |
++----------------------------------------------------------------+
+| 2 |
++----------------------------------------------------------------+
```
Nested higher-order function example - count arrays that contain elements
greater than 5:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]