Skip to content

[fix](sql-functions) add example setup tables to aggregate pages in version-3.x / version-2.1#3884

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix/lineB-aggregate-setup-3x-21
Jun 3, 2026
Merged

[fix](sql-functions) add example setup tables to aggregate pages in version-3.x / version-2.1#3884
morningman merged 1 commit into
apache:masterfrom
boluor:fix/lineB-aggregate-setup-3x-21

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented Jun 2, 2026

Several aggregate-function pages already carry a visible inline setup block (CREATE TABLE + INSERT) on the dev / version-4.x docs, but the version-3.x and version-2.1 copies are missing it — so their SELECT ... FROM <table> examples cannot be run or reproduced (a reader gets Table [...] does not exist).

This PR ports the same visible inline setup block to the version-3.x and version-2.1 copies (EN + ZH), for the pages whose older docs use the same example and data as 4.x:

Page version-3.x version-2.1
CORR
CORR_WELFORD (absent)
COUNT
COVAR
COVAR_SAMP
GROUP_CONCAT
BITMAP_INTERSECT

Each example was verified end-to-end to resolve its table and match that versions documented output — version-3.x on a 3.1.4 cluster and version-2.1 on a 2.1.11 cluster (all pass). EN + ZH, 26 files. No ja-source changes.

Pages whose older-version docs use different tables / data / output than 4.x (e.g. AVG uses log_statis in 3.x but t1 in 4.x; group_bit has no NULL row in older docs) are not included here — those need a per-version reconstruction and will be handled separately.

🤖 Generated with Claude Code

…ersion-3.x / version-2.1

These aggregate-function pages already carry a visible inline setup block
(CREATE TABLE + INSERT) on the dev/version-4.x docs, but the version-3.x and
version-2.1 copies were missing it, so their `SELECT ... FROM <table>` examples
cannot be run or reproduced ("table does not exist").

Port the same visible inline setup block to the version-3.x and version-2.1
copies (EN + ZH) for the pages where the older docs use the same example and
data as 4.x: CORR, CORR_WELFORD (3.x only), COUNT, COVAR, COVAR_SAMP,
GROUP_CONCAT, BITMAP_INTERSECT.

Verified end-to-end that each example resolves its table and matches that
version's documented output: version-3.x on a 3.1.4 cluster and version-2.1 on a
2.1.11 cluster (all pass). Pages whose older-version docs use different
tables/data/output than 4.x are intentionally left out of this PR (they need a
per-version reconstruction, handled separately).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman morningman merged commit 35307e0 into apache:master Jun 3, 2026
3 checks passed
morningman pushed a commit that referenced this pull request Jun 3, 2026
…ages (version-3.x / version-2.1) (#3885)

Follow-up to #3884. These aggregate-function pages query a table that
the `version-3.x` / `version-2.1` docs never define, so the examples
cannot be run or reproduced (`Table [...] does not exist`).

Unlike #3884 (where the older docs matched 4.x and the setup could be
copied), the older docs here use **different example data** than 4.x —
so the setup is **reconstructed from each older pages own printed
output** and emitted as a visible inline block (consistent with the 4.x
pages).

Pages (EN + ZH, `version-3.x` and `version-2.1`):

| | |
| --- | --- |
| `GROUP_BIT_AND` / `GROUP_BIT_OR` / `GROUP_BIT_XOR` | `group_bit` |
| `ARRAY_AGG` | `test_doris_array_agg` |
| `MAX_BY` | `tbl` |
| `ANY_VALUE` | `cost2` |
| `AVG_WEIGHTED` | `test_doris_avg_weighted` |
| `BITMAP_UNION_COUNT` / `BITMAP_UNION_INT` / `GROUP_BITMAP_XOR` /
`INTERSECT_COUNT` | `pv_bitmap` (built via `bitmap_from_string`) |

Each example was verified end-to-end to resolve its table and match that
versions documented output — `version-3.x` on a 3.1.4 cluster and
`version-2.1` on a 2.1.11 cluster (all pass). 44 files. No `ja-source`
changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

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.

2 participants