docs: missing documentation for range table function

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start with the existing docs/en/sql-reference/20-sql-functions/17-table-functions/05-generate-series.md page, then inspect src/query/service/src/table_functions/srf/range.rs and its registration in table_function_factory.rs. Add docs/en/sql-reference/20-sql-functions/17-table-functions/range.md covering range(start, stop[, step]), the provided examples, and its exclusive upper bound and table-function behavior compared with generate_series.

Written by the indexing model from the issue text.

Description

automated issue documentation

Summary

The range table function is implemented in the Databend source code and registered in the table function factory, but has no dedicated documentation page in the table functions reference.

What's Missing

A dedicated reference page for the range() table function under /docs/en/sql-reference/20-sql-functions/17-table-functions/.

Source File

/workspace/databend/src/query/service/src/table_functions/srf/range.rs

The function is registered in the table function factory at:
/workspace/databend/src/query/service/src/table_functions/table_function_factory.rs (line 300)

What It Does

range(start, stop[, step]) is a set-returning function (SRF) that generates a sequence of integers from start (inclusive) to stop (exclusive) with an optional step increment. It is an alias for array_generate_range used as a table function.

Syntax:

SELECT * FROM range(start, stop[, step]);

Examples:

-- Generate integers 0 through 4
SELECT * FROM range(0, 5);

-- Generate even numbers 0 through 8
SELECT * FROM range(0, 10, 2);

Note: range is also registered as an alias array_generate_range in the array scalar functions. The table function form returns rows rather than an array.

Suggested Doc Location

/docs/en/sql-reference/20-sql-functions/17-table-functions/range.md

The existing generate_series table function is documented at 05-generate-series.md. The range function is closely related and should have a similar page, noting the difference in behavior (exclusive upper bound vs inclusive for generate_series).

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.