Skip to content

[fix] remove aggregate-functions bleed from Analytic (Window) Functions sidebar#3703

Closed
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix-sidebar-window-aggregate-bleed
Closed

[fix] remove aggregate-functions bleed from Analytic (Window) Functions sidebar#3703
boluor wants to merge 1 commit into
apache:masterfrom
boluor:fix-sidebar-window-aggregate-bleed

Conversation

@boluor
Copy link
Copy Markdown
Contributor

@boluor boluor commented May 20, 2026

Summary

The Analytic (Window) Functions category in sidebars.ts (current/dev) and versioned_sidebars/version-4.x-sidebars.json wrongly listed 67 aggregate-functions/* entries (any-value through window-funnel) in addition to the 11 genuine window-functions/* entries. As a result those aggregate functions appeared twice in the sidebar — once correctly under `Aggregate Functions`, and once again under `Analytic (Window) Functions`.

version-3.x and version-2.1 sidebars are correctly organized with no overlap; this PR restores the same convention for current/dev and 4.x.

After this change

  • `Aggregate Functions` — 71 items (unchanged)
  • `Analytic (Window) Functions` — 11 items: the SQL-standard window functions (overview, cume-dist, dense-rank, first-value, lag, last-value, lead, ntile, percent-rank, rank, row-number)

Aggregate functions that can be used with `OVER (PARTITION BY ...)` continue to document this usage inside their own page (e.g., `bool-or.md` has a `### Window function:` subsection).

Categorization rationale

Industry survey of the same question:

Engine Aggregate ↔ Window cross-listing WINDOW_FUNNEL / TOPN under Window?
Snowflake Yes, for a curated subset (SUM, AVG, MEDIAN, STDDEV, …) No
Databricks (Spark) No cross-listing N/A
ClickHouse (origin of `windowFunnel` and `topK`) No cross-listing NowindowFunnel is in Parametric aggregate functions; topK is in Aggregate functions

So even the most permissive convention (Snowflake) would not place `WINDOW_FUNNEL`/`TOPN` (or `SEQUENCE_MATCH`, `RETENTION`, `BITMAP_AGG`, etc.) under window functions. The bleed in 4.x was an unintended copy-paste — not a deliberate dual-classification. This PR matches Doris's own pre-existing 3.x / 2.1 convention and ClickHouse / Databricks.

Test plan

  • CI doc build passes
  • Open the docs site sidebar — `Analytic (Window) Functions` should now show only 11 entries; `Aggregate Functions` still shows all aggregates exactly once
  • Spot-check that pages like `/docs/sql-manual/sql-functions/aggregate-functions/sum` and `/docs/sql-manual/sql-functions/window-functions/rank` still resolve correctly

…ns sidebar

The 'Analytic (Window) Functions' category in sidebars.ts (current/dev)
and versioned_sidebars/version-4.x-sidebars.json wrongly listed 67
aggregate-functions/* entries (any-value through window-funnel) in
addition to the 11 genuine window-functions/* entries. As a result,
those aggregate-functions appeared twice in the sidebar (once in
'Aggregate Functions' and once in 'Analytic (Window) Functions').

version-3.x and version-2.1 sidebars are correctly organized with no
overlap; this PR restores the same convention for current/dev and 4.x.

Categorization follows the prevailing industry convention:
- Databricks and ClickHouse keep aggregate functions and window
  functions in separate categories (no cross-listing).
- Snowflake double-categorizes a subset of aggregates that support
  OVER(), but even Snowflake does NOT list WINDOW_FUNNEL or TOPN/TOP_K
  under window functions.

After this change:
- 'Aggregate Functions': 71 items (unchanged)
- 'Analytic (Window) Functions': 11 items (the 11 SQL-standard window
  functions: overview, cume-dist, dense-rank, first-value, lag,
  last-value, lead, ntile, percent-rank, rank, row-number)

Aggregate functions that can be used with OVER() still document this
usage inside their own page (e.g., bool-or.md has a '### Window
function:' subsection).
@boluor
Copy link
Copy Markdown
Contributor Author

boluor commented May 20, 2026

Closing per team feedback — the dual-listing (aggregate functions also indexed under Analytic (Window) Functions) is the intended design for the current/dev and 4.x sidebars.

@boluor boluor closed this May 20, 2026
@boluor boluor deleted the fix-sidebar-window-aggregate-bleed branch May 20, 2026 06:40
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.

1 participant