This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.0 by this push:
     new 7d94c300179 [fix](date) fix allow_zero_date function incorrect result 
issue (#61900)
7d94c300179 is described below

commit 7d94c3001791a0d1428e99c8dd20f24d1ab2cca7
Author: Guangming Lu <[email protected]>
AuthorDate: Thu Apr 9 14:37:14 2026 +0800

    [fix](date) fix allow_zero_date function incorrect result issue (#61900)
    
    ### What problem does this PR solve?
    
    Issue Number: close #61789
    
    Related PR: #xxx
    
    Problem Summary:
    when set be.conf allow_zero_date=true, we found it's do not work
    
    ### Release note
    
    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:
        - [x] No.
        - [ ] Yes. <!-- Explain the behavior change -->
    
    - Does this need documentation?
        - [x] No.
    - [ ] Yes. <!-- Add document PR link here. eg:
    https://github.com/apache/doris-website/pull/1214 -->
    
    ### Check List (For Reviewer who merge this PR)
    
    - [x] Confirm the release note
    - [ ] Confirm test cases
    - [ ] Confirm document
    - [ ] Add branch pick label <!-- Add branch pick label that this PR
    should merge into -->
---
 be/src/vec/io/io_helper.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/be/src/vec/io/io_helper.cpp b/be/src/vec/io/io_helper.cpp
index 139ba40a7c4..5093348c245 100644
--- a/be/src/vec/io/io_helper.cpp
+++ b/be/src/vec/io/io_helper.cpp
@@ -34,12 +34,12 @@ bool read_datetime_text_impl(VecDateTimeValue& x, const 
StringRef& buf) {
 }
 
 bool read_date_v2_text_impl(DateV2Value<DateV2ValueType>& x, const StringRef& 
buf) {
-    return x.from_date_str(buf.data, (int)buf.size, config::allow_zero_date);
+    return x.from_date_str(buf.data, (int)buf.size, -1, 
config::allow_zero_date);
 }
 
 bool read_date_v2_text_impl(DateV2Value<DateV2ValueType>& x, const StringRef& 
buf,
                             const cctz::time_zone& local_time_zone) {
-    return x.from_date_str(buf.data, buf.size, local_time_zone, 
config::allow_zero_date);
+    return x.from_date_str(buf.data, buf.size, local_time_zone, -1, 
config::allow_zero_date);
 }
 
 bool read_datetime_v2_text_impl(DateV2Value<DateTimeV2ValueType>& x, const 
StringRef& buf,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to