[fix](sql-functions) provide setup data for CUME_DIST / DENSE_RANK window examples#3899
Open
boluor wants to merge 1 commit into
Open
[fix](sql-functions) provide setup data for CUME_DIST / DENSE_RANK window examples#3899boluor wants to merge 1 commit into
boluor wants to merge 1 commit into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
CUME_DISTandDENSE_RANKexample pages query tables that the page never defines, so a reader who runs the examples hitstable does not exist. This adds the missing setup so both pages are runnable end-to-end.<!-- setup-sql -->block creating thesalestable the example prints, loaded with exactly the 8 rows already shown in the doc.CUME_DISTis deterministic (tied values share a cumulative value), and the query has no outerORDER BY, so the result is compared as a multiset.int_tsetup 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:
🤖 Generated with Claude Code