doc bug: ARRAY_MAP example SQL selects one column but the output shows two (version-3.x/2.1)
- Dominant language
- MDX
- Stars
- 133
- Forks
- 464
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 50
Description
On the `ARRAY_MAP` page (`scalar-functions/array-functions/array-map.md`, version-3.x and version-2.1), one example does not match its own output:
```sql
select array_map(x->cast(x as string), c_array1) from test_array_map_function;
```
```text
+-----------------+-------------------------------------------------------+
| c_array1 | array_map([x] -> CAST(x(0) AS CHARACTER), `c_array1`) |
+-----------------+-------------------------------------------------------+
| [1, 2, 3, 4, 5] | [1, 2, 3, 4, 5] |
...
```
The SQL selects a single column (the `array_map(...)` result), but the output table has two columns (`c_array1 | array_map(...)`). Running the query as written returns only the `array_map(...)` column.
Suggested fix — align the SQL with the shown output:
```sql
select c_array1, array_map(x->cast(x as string), c_array1) from test_array_map_function;
```
(Also note `test_array_map_function` is never defined on the page; the missing-setup fix for the other array pages is being handled in the Line-B setup PRs, but this page is left out pending the SQL correction above.)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.