Skip to content

[fix](doc) correct AGG_STATE example and workload-group sql fence rendering#3747

Merged
morningman merged 1 commit into
apache:masterfrom
boluor:fix-c-class-close-loop
May 23, 2026
Merged

[fix](doc) correct AGG_STATE example and workload-group sql fence rendering#3747
morningman merged 1 commit into
apache:masterfrom
boluor:fix-c-class-close-loop

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 23, 2026

Summary

Two long-open doc bugs fixed in one PR.

1. AGG_STATE example uses combinators on a non-agg_state column (#2929)

table-design/data-model/aggregate.md declares the example table with v1 int SUM, v2 agg_state<group_concat(string)>. The page then incorrectly calls sum_union(v1) (union-insert) and sum_merge(v1) (result query) — but v1 is a plain aggregate-key column, not agg_state<sum(int)>. MergeCombinator and UnionCombinator in fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/combinator/ cast their argument to AggStateType, so the example as written fails at analysis time.

Replace with plain sum(v1) across the union-insert and the two result queries. Numeric output (20 / 16) is unchanged and matches what the doc already claims. group_concat_merge(v2) / group_concat_union(v2) on v2 remain correct because v2 is genuinely declared as agg_state.

Result tables re-flowed to mysql-CLI-correct column widths.

2. workload-group "View Schema" SQL block renders as literal text (#2497)

admin-manual/workload-management/workload-group.md had a 4-space-indented \``sql DESC FUNCTION s3 (...) ```` block sitting directly after a plain paragraph (no parent list item). CommonMark treats 4-space indent as an indented code block, so the inner fence markers render as literal text on the rendered page — exactly what the reporter's screenshot shows.

De-indent the block to column 0. current and version-4.x already carry this fix; backport to version-2.1 and version-3.x EN + zh.

Scope

Fix Files
AGG_STATE — sum_merge/sum_union(v1)sum(v1) aggregate.md × 8 (current/2.1/3.x/4.x EN+zh)
workload-group — de-indent DESC FUNCTION block workload-group.md × 4 (2.1/3.x EN+zh)

Test plan

  • Dead-link check passes
  • Result tables align in monospace
  • No remaining sum_merge(v1) / sum_union(v1) in aggregate.md

Closes #2497
Closes #2929

…-group sql fence rendering

Two unrelated doc bugs reported by users:

1. table-design/data-model/aggregate.md (current/2.1/3.x/4.x EN+zh) — the
   AGG_STATE example wraps the result-table query as `sum_merge(v1)` and the
   union-insert as `sum_union(v1)`, but `v1` is declared `int SUM` (a plain
   aggregate-key column), not `agg_state<sum(int)>`. MergeCombinator /
   UnionCombinator (fe/fe-core/.../combinator/MergeCombinator.java) cast arg0
   to AggStateType, so `sum_merge(v1)` / `sum_union(v1)` fail at analysis time
   on the example as written. Replace with plain `sum(v1)`; the numeric result
   (20 / 16) is unchanged and matches the example's claimed output. Re-flow
   the result tables to mysql-CLI-correct column widths.

2. admin-manual/workload-management/workload-group.md (2.1 + 3.x EN+zh) — the
   standalone `DESC FUNCTION s3 (...)` block was 4-space-indented immediately
   after a plain paragraph (no parent list item), so CommonMark/Docusaurus
   parses it as an indented code block and renders the inner ```sql /  ``` as
   literal text. De-indent to column 0. current/4.x already carried this fix.

Closes apache#2497
Closes apache#2929
@morningman morningman merged commit 8c4b097 into apache:master May 23, 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.

Issue on docs Issue on docs workload-group

2 participants