jacktengg opened a new pull request, #68830:
URL: https://github.com/apache/doris/pull/68830

   ### What problem does this PR solve?
   
   Issue Number: N/A
   
   Related PR: #56659
   
   Problem Summary: hour_minute, hour_second, minute_second, and 
second_microsecond only declared DATETIMEV2 and TIMESTAMP_NS signatures. A 
valid time-only string such as '12:34:56.789123' was implicitly cast to an 
invalid DATETIME and produced NULL. Explicit TIME inputs also went through a 
DATETIME conversion, which could wrap extended or negative durations. EXTRACT 
uses the same scalar functions.
   
   Add TIME and string signatures and share analysis-time rewriting to the 
existing time_format implementation. String literals retain precise temporal 
binding; string columns retain DATETIME parsing and fall back to TIME parsing, 
preserving six fractional digits. Other types and volatile string expressions 
retain their historical conversion paths. No BE function or protocol additions 
are required.
   
   ### Release note
   
   The four composite time extraction functions and their EXTRACT forms 
recognize valid time-only string literals and string columns, and preserve TIME 
precision, extended hours, and signs instead of converting TIME through 
DATETIME.
   
   ### Check List (For Author)
   
   - Test: Unit Test / Regression test / Manual test
       - run-fe-ut.sh: CompositeTimeExtractTest, 5 tests passed.
       - run-regression-test.sh: test_composite_time_extract (54 result tags), 
test_date_function, and test_add_sub_union_type passed.
       - Regression output was generated and then verified using the preset 
script.
       - FE build and Checkstyle passed. The local build temporarily skipped 
the BE-only third-party dependency gate after rebuilding the FE compiler tools; 
the build script adjustment was restored and is not part of this commit.
       - The reported SQL now returns 12:34 / 12:34:56 / 34:56 / 56.789123.
   - Behavior changed: Yes, valid time-only strings and TIME durations are 
extracted consistently; existing DATETIMEV2 and TIMESTAMP_NS bindings are 
preserved.
   - Does this need documentation: No, this restores the existing time 
extraction behavior for implicit input conversion.
   
   ### 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: 
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]

Reply via email to