Skip to content

[fix](docs) add table setup for IF example in 3.x/2.1#3892

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

[fix](docs) add table setup for IF example in 3.x/2.1#3892
morningman merged 1 commit into
apache:masterfrom
boluor:fix/phantom-table-setup-conditional-functions

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented Jun 3, 2026

Problem

The IF function page (version-3.x and version-2.1, EN + ZH) shows:

SELECT user_id, IF(user_id = 1, 'true', 'false') AS test_if FROM test;

but the page never defines test, so anyone copy-pasting the example hits table does not exist.

Fix

Add a visible CREATE TABLE + INSERT block before the example (matching the "prepare data" style already used on the 4.x copy of this page), so the example is self-contained and reproducible. Renders as an ordinary code block; no change to the example SQL or its expected output.

Verification

Ran the modified pages end-to-end on fresh live clusters — Doris 3.1.4 (for version-3.x) and 2.1.11 (for version-2.1). The example reproduces the documented output exactly, cell for cell.

Files: version-3.x + version-2.1, EN + ZH (4 files).

🤖 Generated with Claude Code

The IF example queries `FROM test` but no version of the page ever
creates `test`, so readers hit "table does not exist". Add a visible
CREATE TABLE + INSERT before the example (EN + ZH, version-3.x and
version-2.1), matching the 4.x page's "prepare data" style. Verified
end-to-end on live 3.1.4 and 2.1.11 clusters: the example reproduces
the documented output exactly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman morningman merged commit 76f2061 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