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.
On the
EXPLODE_BITMAPpage (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:explode_json_object(value_json), butexamplehas novalue_jsoncolumn (onlyk1,v1), and selectsid, k, vwhich don't exist either.k1/bitcolumns:2→0,1→10101) is actually the result ofexplode_bitmap(v1), notexplode_json_object.AS k, valias 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.