expression: from_days' behavior is different than mysql and tidb.
Open
Nobody has claimed this yet.
component/compute
severity/moderate
type/bug
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
Bug Report
| days | mysql | tidb | tiflash |
|---|---|---|---|
| <=365 | ZERO_DATE | ZERO_DATE | ZERO_DATE |
| [366, 3652424] | [0001-01-01, 9999-12-31] | [0001-01-01, 9999-12-31] | [0001-01-01, 9999-12-31] |
| [3652425, 3652499] | Null | [10000-01-01, 10000-03-15] | Null |
| >=3652500 | ZERO_DATE | ZERO_DATE | Null |
note that tiflash's fromDays receive an int32 parameter, so it may truncate big integer.
What is your TiFlash version? (Required)
6.1+
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.
Research direction
Start by locating the expression implementation for from_days and the TiFlash fromDays entry point, then compare its results with the MySQL and TiDB ranges shown in the report. Clarify which reference behavior is expected, including the int32 truncation concern, and consider the issue done when the selected compatibility behavior is verified across all listed ranges.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100