Skip to content

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

@boluor

Description

@boluor

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:

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions