risingwave
risingwave copied to clipboard
bug(expr): to_char consider unsupported format as plain text
Describe the bug
Current, to_char
works like this:
- find all the format item like 'YYYY(means year)'
- replace them with the number
- if the format item is unrecognized, consider it as plain text and keep it unchaged.
- return the string after replacemnt
The problem happens in 3. As we haven't support all the format item. An unknown format item will be kept as plain text and outputed. It does not produce any errors. This may cause user confused. Throwing an error may be better.
Error message/log
wrong output: `Day`
To Reproduce
SELECT to_char('2015-09-01T14:48:05.359000'::timestamp, 'Day');
Expected behavior
output Tuesday
How did you deploy RisingWave?
doesn't matter.
The version of RisingWave
v1.6
Additional context
No response
Ping @KeXiangWang
This issue has been open for 60 days with no activity.
If you think it is still relevant today, and needs to be done in the near future, you can comment to update the status, or just manually remove the no-issue-activity
label.
You can also confidently close this issue as not planned to keep our backlog clean. Don't worry if you think the issue is still valuable to continue in the future. It's searchable and can be reopened when it's time. 😄