docs: missing documentation for TO_INTERVAL and TRY_TO_INTERVAL 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 /docs/en/sql-reference/20-sql-functions/05-datetime-functions/try-to-datetime.md and try-to-timestamp.md for the expected format, then check the implementation in /workspace/databend/src/query/functions/src/scalars/timestamp/src/interval.rs. Add the suggested to-interval.md page covering both functions, syntax, arguments, return behavior, and common interval-string examples; done means the SQL reference documents both functions clearly.
Written by the indexing model from the issue text.
Description
Summary
The TO_INTERVAL and TRY_TO_INTERVAL functions are implemented and registered in the Databend source but have no documentation page in the SQL reference.
Source
- File:
/workspace/databend/src/query/functions/src/scalars/timestamp/src/interval.rs - Registration:
register_string_to_interval()registers bothto_interval(viascalar_builder) andtry_to_interval(viaregister_combine_nullable_1_arg)
What They Do
TO_INTERVAL(string)— Parses a string into anINTERVALvalue. Accepts standard interval literals such as'1 year 2 months','3 days 4 hours','5 minutes', etc. Throws an error if the string cannot be parsed.TRY_TO_INTERVAL(string)— Same asTO_INTERVALbut returnsNULLinstead of throwing an error on invalid input.
These are the primary way to construct INTERVAL values from string literals in Databend, analogous to TO_DATE / TRY_TO_DATE for dates.
What's Missing
No documentation page exists for either function. The interval data type page at /docs/en/sql-reference/00-sql-reference/10-data-types/interval.md mentions intervals but does not document these conversion functions.
The existing try-to-datetime.md and try-to-timestamp.md pages in the datetime functions section show the expected doc format.
Suggested Doc Location
/docs/en/sql-reference/20-sql-functions/05-datetime-functions/to-interval.md
The page should cover both TO_INTERVAL and TRY_TO_INTERVAL, include syntax, argument description, return type (INTERVAL or NULL), and examples showing common interval string formats.
- 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