Skip to content

[fix](sql-functions) provide setup data for CUME_DIST / DENSE_RANK window examples#3899

Open
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/phantom-table-setup-window-cume-dense
Open

[fix](sql-functions) provide setup data for CUME_DIST / DENSE_RANK window examples#3899
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix/phantom-table-setup-window-cume-dense

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented Jun 3, 2026

The CUME_DIST and DENSE_RANK example pages query tables that the page never defines, so a reader who runs the examples hits table does not exist. This adds the missing setup so both pages are runnable end-to-end.

  • cume-dist (dev + 4.x + 3.x + 2.1, EN+ZH): a render-invisible <!-- setup-sql --> block creating the sales table the example prints, loaded with exactly the 8 rows already shown in the doc. CUME_DIST is deterministic (tied values share a cumulative value), and the query has no outer ORDER BY, so the result is compared as a multiset.
  • dense-rank (dev + 3.x + 2.1, EN+ZH): port the visible int_t setup block + clean output table that version-4.x already carries, so the older copies match 4.x and become self-contained. (4.x is unchanged.)

No rendered page, expected output, or ja-source/ is altered — pure setup addition (cume-dist) / alignment to the existing 4.x form (dense-rank).

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

version cluster cume-dist dense-rank
dev master daily (doris-0.0.0-2e72603618c) P3 F0 (EN+ZH) P3 F0 (EN+ZH)
4.x 4.1.1 P3 F0 (EN+ZH) unchanged (control: P3 F0)
3.x 3.1.4-rc02 P3 F0 (EN+ZH) P3 F0 (EN+ZH)
2.1 2.1.11-rc01 P3 F0 (EN+ZH) P3 F0 (EN+ZH)

🤖 Generated with Claude Code

…ndow examples

The CUME_DIST and DENSE_RANK example pages query tables that no version of
the page ever defines, so a reader running them hits "table does not exist".

- cume-dist (dev + 4.x + 3.x + 2.1, EN+ZH): add a render-invisible
  `<!-- setup-sql -->` block creating the `sales` table the example prints,
  loaded with exactly the 8 rows already shown in the doc.
- dense-rank (dev + 3.x + 2.1, EN+ZH): port the visible `int_t` setup block
  and clean output table that version-4.x already carries, so the older
  copies match 4.x and become runnable end-to-end. (4.x already has it.)

Verified end-to-end on fresh single-BE clusters — 4.1.1 / 3.1.4 / 2.1.11 and
the local master daily build — every touched example reproduces the doc's
printed output cell-for-cell (each page P3 F0, 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