apache / apache/doris-website

[doc] explode-bitmap (4.x/3.x/2.1): stray explode_json_object example references non-existent columns; dev already dropped it

Open
#3,905 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
MDX
Stars
133
Forks
464
Avg merge
1d 1h
Merged PRs (30d)
50

Description

On the `EXPLODE_BITMAP` page (`sql-manual/sql-functions/table-functions/explode-bitmap.md`) in **version-4.x / version-3.x / version-2.1**, the last example is a copy-paste error:

```sql
CREATE TABLE example ( k1 INT, v1 bitmap ) ... ;
insert into example values(1,to_bitmap('10101')),(2,to_bitmap('0')),(3,to_bitmap(NULL));

SELECT id, k, v
FROM example
LATERAL VIEW explode_json_object(value_json) exploded_table AS k , v;
```
- It calls `explode_json_object(value_json)`, but `example` has no `value_json` column (only `k1`, `v1`), and selects `id, k, v` which don't exist either.
- The printed output (`k1` / `bit` columns: `2→0`, `1→10101`) is actually the result of **`explode_bitmap(v1)`**, not `explode_json_object`.
- On 2.1/3.x this fails (the `AS k, v` alias list is misparsed → `Unknown table 'v'`).

The **dev** version of this page has already removed this broken block. Recommend aligning 4.x/3.x/2.1 with dev — either drop the stray example or rewrite it as a valid `explode_bitmap(v1)` example matching the shown output. Happy to send the PR.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.