Skip to content

[fix](sql-functions) provide setup data for BITMAP_HASH / BITMAP_UNION examples#3900

Open
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/phantom-table-setup-bitmap-hash-union
Open

[fix](sql-functions) provide setup data for BITMAP_HASH / BITMAP_UNION examples#3900
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/phantom-table-setup-bitmap-hash-union

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented Jun 3, 2026

Both bitmap example pages query tables that the older copies never define, so a reader who runs the examples hits table does not exist.

  • bitmap-hash (dev + 3.x + 2.1, EN+ZH): these copies still showed the old words example with an unreproducible expected count (33263478) and no table behind it. Port the version-4.x rewrite — a concrete words table (6 rows, 4 distinct) with the matching reproducible result (4), plus the note that a real-scale corpus returns far larger numbers. (4.x is unchanged.)
  • bitmap-union (3.x + 2.1, EN+ZH): the example reads an aggregate-model pv_bitmap (the page documents that table near the bottom) but never creates it. Add a runnable -- setup that builds the aggregate table (user_id BITMAP BITMAP_UNION, AGGREGATE KEY(dt,page)) and loads the to_bitmap rows, so the dt/page result and the dedup count (3) reproduce. An aggregate model is required — a duplicate-model table would not collapse to the two rows the doc prints. (dev/4.x already carry setup.)

No rendered prose, expected output, or ja-source/ is altered beyond replacing the unreproducible bitmap-hash count with the reproducible 4.x value.

Verification — every touched example executed end-to-end on fresh single-BE clusters, reproducing the doc's printed output cell-for-cell:

version cluster bitmap-hash bitmap-union
dev master daily (doris-0.0.0-2e72603618c) P5 F0 (EN+ZH) unchanged (control: P4 F0)
3.x 3.1.4-rc02 P5 F0 (EN+ZH) P3 F0 (EN+ZH)
2.1 2.1.11-rc01 P5 F0 (EN+ZH) P3 F0 (EN+ZH)

🤖 Generated with Claude Code

…N examples

Both bitmap example pages query tables that the older copies never define.

- bitmap-hash (dev + 3.x + 2.1, EN+ZH): these copies still showed the old
  `words` example with an unreproducible expected count (33263478) and no
  table. Port the version-4.x rewrite: a concrete `words` table (6 rows, 4
  distinct) with the matching reproducible result (4), plus the note that a
  real-scale corpus returns far larger numbers. (4.x already has this.)
- bitmap-union (3.x + 2.1, EN+ZH): the example reads an aggregate-model
  `pv_bitmap` (the page documents the table at the bottom) but never creates
  it. Add a runnable `-- setup` that builds the aggregate table
  (user_id BITMAP BITMAP_UNION, AGGREGATE KEY(dt,page)) and loads the
  to_bitmap rows, so the dt/page result and the dedup count (3) reproduce.
  An aggregate model is required here — a duplicate-model table would not
  collapse to the two rows the doc prints. (dev/4.x already have setup.)

Verified end-to-end on fresh single-BE clusters — 3.1.4, 2.1.11, and the
local master daily build — every touched example reproduces the doc's printed
output cell-for-cell (F0 on every version, EN and ZH).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant