Skip to content

[fix](sql-functions) provide setup data for numeric-function examples querying an undefined table#3878

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix/phantom-table-setup-numeric-functions
Jun 3, 2026
Merged

[fix](sql-functions) provide setup data for numeric-function examples querying an undefined table#3878
morningman merged 1 commit into
apache:masterfrom
boluor:fix/phantom-table-setup-numeric-functions

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented Jun 2, 2026

The ROUND_BANKERS and UNIFORM pages each show a SELECT ... FROM <table> example with an expected result, but never define the table on the page. As written these examples cannot be run or reproduced — a reader who copies them gets Table [...] does not exist.

This PR adds the missing CREATE TABLE + INSERT for each table, carried in a standard HTML comment (<!-- setup-sql ... -->) just before the example. Because it is an HTML comment, the rendered page is unchanged and no documented expected output is modified.

Pages and tables

Function Table(s)
ROUND_BANKERS test_enhanced_round
UNIFORM it, fn_test

ROUND_BANKERS is updated in EN + ZH across dev/current, version-4.x, version-3.x and version-2.1; UNIFORM exists only in dev/current and version-4.x (12 files total). Verified end-to-end: ROUND_BANKERS on 4.1.1 / 3.1.4 / 2.1.11 / master, UNIFORM on 4.1.1 / master. The deterministic examples failed with "table does not exist" before this change and match the documented output after it. (UNIFORMs random()-seeded examples are inherently non-deterministic, as the page itself notes — those keep showing sample output.) No ja-source changes.

🤖 Generated with Claude Code

… querying an undefined table

ROUND_BANKERS and UNIFORM each show a `SELECT ... FROM <table>` example with an
expected result, but never define the table on the page, so the examples cannot be
run or reproduced ("table does not exist").

Add the missing CREATE TABLE + INSERT for each table (`test_enhanced_round` for
ROUND_BANKERS; `it` and `fn_test` for UNIFORM), carried in a standard HTML comment
(`<!-- setup-sql ... -->`) before the example. As an HTML comment it does not change
the rendered page, and no documented expected output is modified.

Table contents were reverse-derived from the printed output and verified end-to-end
on the matching release cluster for each doc tree: ROUND_BANKERS on 4.1.1 / 3.1.4 /
2.1.11 / master; UNIFORM (dev + version-4.x only) on 4.1.1 / master. The deterministic
examples now resolve and match the documented output (UNIFORM's random()-seeded
examples remain inherently non-deterministic, as the doc itself notes).

ROUND_BANKERS updated in EN + ZH across dev/current, version-4.x, version-3.x and
version-2.1; UNIFORM in EN + ZH across dev/current and version-4.x.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman morningman merged commit dbd1606 into apache:master Jun 3, 2026
3 checks passed
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.

2 participants