-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](function)fix month=0 of from_iso8601_date function. #53050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 33441 ms |
TPC-DS: Total hot run time: 186136 ms |
ClickBench: Total hot run time: 30.25 s |
zclllyybb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
|
run buildall |
TPC-H: Total hot run time: 33698 ms |
TPC-DS: Total hot run time: 187616 ms |
ClickBench: Total hot run time: 30.08 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
7896955 to
1b62c07
Compare
|
run buildall |
TPC-H: Total hot run time: 33277 ms |
TPC-DS: Total hot run time: 184721 ms |
ClickBench: Total hot run time: 29.94 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
zclllyybb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
Related PR: apache#40695 Problem Summary: pr apache#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 date 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() ```
Related PR: apache#40695 Problem Summary: pr apache#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 date 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() ```
Related PR: apache#40695 Problem Summary: pr apache#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 date 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() ```
…53050) (#53438) bp #53050 Related PR: #40695 Problem Summary: 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 date 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() ``` ### What problem does this PR solve? Issue Number: close #xxx Related PR: #xxx Problem Summary: ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [ ] 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: apache/doris-website#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 -->
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 theset_time_unitfunction.Since
set_time_unitlacks some judgment on mouth, it may get an illegal date in the end, which may cause core in debug mode.sql :
select from_iso8601_date('2023-00-01');None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)