4paradigm / 4paradigm/OpenMLDB
built-in-function: Support returning a null instead of returning zero when data/time functions come across with an exception
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 331
- Avg merge
- 12d 12h
- Merged PRs (30d)
- 1
Description
**Is your feature request related to a problem? Please describe.**
OpenMLDB have a lots of date/time built-in functions. For example, we provides functions like 'dayofyear()', `dayofweek()`, etc.
We would like to return a NULL value when an exception occurs during parse a date or time.\
**Describe the solution you'd like**
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Contributor guide
Research direction
Look for date/time built-in functions like dayofyear() and dayofweek() in the codebase, likely in a directory like src/builtin or similar. Understand how exceptions are currently handled and where NULL returns can be inserted. Check existing tests for these functions to see the expected behavior and add new test cases for exception scenarios.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases, machine-learning
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100