boluor opened a new pull request, #3814: URL: https://github.com/apache/doris-website/pull/3814
## Summary Doc page (4.x): \`scalar-functions/array-functions/array-count.md\` (EN). The \"nested higher-order function example\" claimed: \`\`\`sql SELECT array_count(x -> array_exists(y -> y > 5, x), [[1,2,3],[4,5,6],[7,8,9]]); -> 2 \`\`\` On Apache Doris 4.1.1 this actually errors: \`\`\` ERROR 1105 (HY000): errCode = 2, detailMessage = Can not find the compatibility function signature: array_count(ARRAY<ARRAY<BOOLEAN>>) \`\`\` because the lambda \`x -> array_exists(y -> y > 5, x)\` returns an \`ARRAY<BOOLEAN>\` for each outer element (one bool per inner element), not a scalar boolean — and \`array_count\`'s lambda body must be scalar-castable. The ZH counterpart already documents this signature error. This change: 1. Replaces the bogus \"-> 2\" output with the actual signature error and a one-paragraph intro explaining why \`array_exists\` doesn't compose into \`array_count\` directly. (Matches ZH's treatment.) 2. Adds a follow-up example that demonstrates the correct way to express the original intent — count outer arrays that contain *any* element greater than 5 — using \`size(array_filter(y -> y > 5, x)) > 0\` as the lambda body. That returns the integer \`2\` the original example was trying to teach. ## Verification Both forms run on a single-node Apache Doris 4.1.1 cluster: - Original nested form: errors with the documented detailMessage. - Workaround form: returns \`2\`. ## Test plan - [x] Run both forms on a 4.1.1 cluster — error reproduces; workaround returns 2. - [x] Result-block divider widths match the cluster's column header. - [x] No other change. 🤖 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]
