docs: missing documentation for NUMBERS, NUMBERS_MT, and NUMBERS_LOCAL table functions
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/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 registrations in src/query/service/src/table_functions/table_function_factory.rs and the existing docs/en/sql-reference/00-sql-reference/31-system-tables/system-numbers.md page. Add docs/en/sql-reference/20-sql-functions/17-table-functions/numbers.md covering numbers, numbers_mt, and numbers_local, including syntax, arguments, return schema, parallelism, and examples. Done means all three functions have a dedicated SQL reference page.
Written by the indexing model from the issue text.
Description
Summary
The numbers, numbers_mt, and numbers_local table functions are registered in the table function factory but are only documented as a system table (system.numbers), not as table functions in the SQL reference table-functions section.
Source
- File:
/workspace/databend/src/query/service/src/table_functions/table_function_factory.rs - Registration (lines 128–142): All three variants are registered via
NumbersTable::create
creators.insert("numbers".to_string(), (next_id(), number_table_func_creator.clone()));
creators.insert("numbers_mt".to_string(), (next_id(), number_table_func_creator.clone()));
creators.insert("numbers_local".to_string(), (next_id(), number_table_func_creator));
What They Do
These table functions generate a sequence of integers starting from 0:
numbers(N)— Generates N rows with a singleUInt64columnnumber(0 to N-1). Parallelized across all available threads.numbers_mt(N)— Same asnumbers, explicitly multi-threaded.numbers_local(N)— Same but runs on a single thread (local execution).
They are widely used for testing, benchmarking, and generating synthetic datasets. Example:
SELECT avg(number) FROM numbers(100000000);
SELECT sum(number) FROM numbers_mt(1000000) WHERE number % 2 = 0;
What's Missing
The existing system.numbers page at /docs/en/sql-reference/00-sql-reference/31-system-tables/system-numbers.md only briefly mentions the function call syntax. There is no dedicated table-function reference page covering all three variants, their differences (parallelism behavior), and usage patterns.
The SHOW TABLE FUNCTIONS output lists numbers, numbers_mt, and numbers_local but users have no reference page to link to.
Suggested Doc Location
/docs/en/sql-reference/20-sql-functions/17-table-functions/numbers.md
The page should cover all three variants, explain the parallelism difference, include the syntax, argument description, return schema, and examples.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from databendlabs/databend-docs
-
Link Checker Report Openautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
databendlabs/databend-docs#3504 ·
-
Link Checker Report Openautomated issue report
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
databendlabs/databend-docs#3503 ·
-
auto-fix-done documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
databendlabs/databend-docs#3359 ·
-
auto-fix-done documentation
Difficulty 2/5 1-2 days Newbie friendliness 72/100
databendlabs/databend-docs#3356 ·
-
auto-fix documentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
databendlabs/databend-docs#3302 ·
All issues in databendlabs/databend-docs
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100