boluor opened a new pull request, #3866:
URL: https://github.com/apache/doris-website/pull/3866
## What
The **dev EN** `array-count` page presented this nested higher-order example
as if it works, claiming a result of `2`:
```sql
SELECT array_count(x -> array_exists(y -> y > 5, x),
[[1,2,3],[4,5,6],[7,8,9]]);
```
But `array_exists` returns an **ARRAY** (one boolean per inner element), and
`array_count` expects the lambda body to return a scalar it can cast to
BOOLEAN. On a live cluster this errors:
```
ERROR 1105 (HY000): errCode = 2, detailMessage =
Can not find the compatibility function signature:
array_count(ARRAY<ARRAY<BOOLEAN>>)
```
## Fix
This is intended behavior, not a signature gap — the **dev ZH**, **v4.x ZH**
and **v4.x EN** pages already document this exact error as the "lambda returns
an array" failure case. This PR brings dev EN in line with the v4.x EN
treatment: show the signature error, then give a working alternative whose
lambda returns a scalar BOOLEAN:
```sql
SELECT array_count(x -> size(array_filter(y -> y > 5, x)) > 0,
[[1,2,3],[4,5,6],[7,8,9]]);
-- 2
```
## Verified live
Both statements run on a master daily build (`doris-0.0.0-2e72603618c`): the
first reproduces the signature error verbatim, the second returns `2`.
## Scope
**EN-only.** dev ZH, v4.x EN and v4.x ZH already document the error
correctly, so no backport is needed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]