FunctionDateFormat should accept non-constant format string argument
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1k
- Forks
- 423
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 24
Description
FunctionFromUnixTime use FunctionDateFormat to format DateTime result.
In MySQL and TiDB, FROM_UNIXTIME can take a column as format string(the second argument), while FunctionDateFormat cannot take a non-constant column as format string. Therefore, if you are trying to push a function like FROM_UNIXTIME(1, col) down to TiFlash, there will be an error Argument at index 1 for function dateFormat must be constant.
To be compatible with TiDB, we should fix it.
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 tracing how FunctionFromUnixTime calls FunctionDateFormat and where the constant-format restriction produces the reported error. Verify behavior for FROM_UNIXTIME(1, col) against TiDB; done means a non-constant column format is accepted without the dateFormat constant-argument error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100