hubgeter opened a new pull request, #53050:
URL: https://github.com/apache/doris/pull/53050
### What problem does this PR solve?
Related PR: #40695
Problem Summary:
### Release note
pr #40695 introduced the function `from_iso8601_date`, which parses the
string to get year、mouth、 day, and sets the date value through the
`set_time_unit` function.
Since `set_time_unit` lacks some judgment on mouth, it may get an illegal
time in the end, which may cause core in debug mode.
sql : `select from_iso8601_date('2023-00-01');`
```
F20250709 09:50:14.366984 3587796 vdatetime_value.h:1222] Check failed:
date_v2_value_.month_ != 0
*** Check failure stack trace: ***
@ 0x559bd7050d96 google::LogMessage::SendToLog()
@ 0x559bd704d7e0 google::LogMessage::Flush()
@ 0x559bd70515d9 google::LogMessageFatal::~LogMessageFatal()
@ 0x559bc725a570 doris::DateV2Value<>::set_time_unit<>()
@ 0x559bc7257380 doris::vectorized::FromIso8601DateV2::execute()
@ 0x559bc7255a88
doris::vectorized::FunctionOtherTypesToDateType<>::execute_impl()
@ 0x559bc09e0781
doris::vectorized::DefaultExecutable::execute_impl()
@ 0x559bc423aa20
doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal()
@ 0x559bc4234938
doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns()
@ 0x559bc4233f42
doris::vectorized::PreparedFunctionImpl::default_implementation_for_nulls()
@ 0x559bc423a773
doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal()
@ 0x559bc4234938
doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns()
@ 0x559bc4234a57 doris::vectorized::PreparedFunctionImpl::execute()
```
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [x] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]