docs: missing documentation for RANGE_BOUND aggregate function

Open Beginner friendly
#3,186 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Quiet
Tech stack
sql
Domain
documentation

Research direction

Read src/query/functions/src/aggregates/aggregate_range_bound.rs and its registration in src/query/functions/src/aggregates/aggregator.rs, then create the page at docs/en/sql-reference/20-sql-functions/07-aggregate-functions/aggregate-range-bound.md. Document the parameters, supported arguments, return value, partition-boundary behavior, and the supplied SQL example. Done means the missing function has a complete documentation page in the suggested location.

Written by the indexing model from the issue text.

Description

documentation

Missing Documentation: range_bound Aggregate Function

What is missing

The range_bound aggregate function is implemented in the Databend source code but has no documentation page in databend-docs.

Source code location

src/query/functions/src/aggregates/aggregate_range_bound.rs

Registered in the aggregate function factory at:
src/query/functions/src/aggregates/aggregator.rs (line 146)

What it does

range_bound(partition_num[, sample_size])(col) calculates partition boundary values for a given column. It divides the column's data range into partition_num partitions using sampling, and returns an array of boundary values that define the ranges for each partition.

This is useful for data redistribution and range-based partitioning strategies.

Parameters:

  • partition_num (required) — number of partitions to divide the data into
  • sample_size (optional) — number of samples per block used for boundary estimation

Arguments:

  • col — the column to compute partition boundaries for (supports numeric and string types)

Returns: An array of (partition_num - 1) boundary values.

Example:

-- For values (0, 1, 3, 6, 8) with partition_num=3, returns boundaries like [1, 6]
SELECT range_bound(3)(col) FROM t;
Suggested doc location

docs/en/sql-reference/20-sql-functions/07-aggregate-functions/aggregate-range-bound.md

Dominant language
TypeScript
Stars
17
Forks
44
Avg merge
2d 7m
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databendlabs/databend-docs

All issues in databendlabs/databend-docs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.