[fix](doc) correct AGG_STATE example and workload-group sql fence rendering#3747
Merged
Merged
Conversation
…-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
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.
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.mddeclares the example table withv1 int SUM,v2 agg_state<group_concat(string)>. The page then incorrectly callssum_union(v1)(union-insert) andsum_merge(v1)(result query) — butv1is a plain aggregate-key column, notagg_state<sum(int)>.MergeCombinatorandUnionCombinatorinfe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/combinator/cast their argument toAggStateType, 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)onv2remain correct becausev2is genuinely declared asagg_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.mdhad 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.
currentandversion-4.xalready carry this fix; backport toversion-2.1andversion-3.xEN + zh.Scope
sum_merge/sum_union(v1)→sum(v1)aggregate.md× 8 (current/2.1/3.x/4.x EN+zh)workload-group.md× 4 (2.1/3.x EN+zh)Test plan
sum_merge(v1)/sum_union(v1)in aggregate.mdCloses #2497
Closes #2929