Uh oh!
There was an error while loading. Please reload this page.
[Fix](function) avoid false alarm of some datelike functions - #59897
Conversation
zclllyybb
commented
Jan 14, 2026
run buildall |
Thearas
commented
Jan 14, 2026
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
doris-robot
commented
Jan 15, 2026
TPC-H: Total hot run time: 31122 ms |
doris-robot
commented
Jan 15, 2026
TPC-DS: Total hot run time: 173020 ms |
767f990 to
e82fbadComparee82fbad to
2c5c451Comparezclllyybb
commented
Jan 15, 2026
run buildall |
doris-robot
commented
Jan 15, 2026
TPC-H: Total hot run time: 31472 ms |
doris-robot
commented
Jan 15, 2026
TPC-DS: Total hot run time: 174077 ms |
doris-robot
commented
Jan 15, 2026
ClickBench: Total hot run time: 26.83 s |
zclllyybb
commented
Jan 15, 2026
run beut |
zclllyybb
commented
Jan 15, 2026
run buildall |
PR approved by anyone and no changes requested. |
doris-robot
commented
Jan 15, 2026
TPC-H: Total hot run time: 31616 ms |
doris-robot
commented
Jan 15, 2026
TPC-DS: Total hot run time: 173259 ms |
doris-robot
commented
Jan 15, 2026
ClickBench: Total hot run time: 26.58 s |
hello-stephen
commented
Jan 15, 2026
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
There was a problem hiding this comment.
Pull request overview
This PR fixes false alarm errors in date-related functions when processing NULL values from LEFT JOIN operations. When joins generate NULL rows with unspecified nested values, functions with use_default_implementation_of_null = true could raise spurious "out of range" errors. The fix changes these functions to handle nulls manually, avoiding validation on invalid default values.
Changes:
- Modified multiple date functions to set
use_default_implementation_for_nulls() = falseand handle NULL values manually - Added manual NULL map handling for
date_trunc,last_day,to_monday,unix_timestamp,from_seconds,from_milliseconds, andfrom_microseconds - Added regression test to verify NULL handling with LEFT JOIN operations
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| be/src/vec/functions/function_other_types_to_date.cpp | Removed error checking in date_trunc, modified unix_timestamp implementations to handle nulls manually, and updated last_day/to_monday to process NULL maps before validating data |
| be/src/vec/functions/function_date_or_datetime_computation.h | Updated from_second/from_millisecond/from_microsecond functions to manually handle NULL values |
| regression-test/suites/correctness_p0/test_date_trunc_error.groovy | Added test case with LEFT JOIN to verify date functions handle NULL values without errors |
| regression-test/data/correctness_p0/test_date_trunc_error.out | Expected output showing NULL values propagate correctly through date functions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Uh oh!
There was an error while loading. Please reload this page.
PR approved by at least one committer and no changes requested. |
hello-stephen
commented
Jan 15, 2026
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Uh oh!
There was an error while loading. Please reload this page.
join may generate null rows with unspecified nested value. may make some functions with `use_default_implementation_of_null = true` raise false positive alarm like `errCode = 2, detailMessage = (172.20.56.1)[E-218]Operation date_trunc of out of range`. this fix relates to some functions: ``` date_trunc last_day to_monday unix_timestamp from_seconds from_milliseconds from_microseconds ```
…ons apache#59897 (apache#59931) Cherry-picked from apache#59897 Co-authored-by: zclllyybb <zhaochangle@selectdb.com>
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
join may generate null rows with unspecified nested value. may make some functions with
use_default_implementation_of_null = trueraise false positive alarm likeerrCode = 2, detailMessage = (172.20.56.1)[E-218]Operation date_trunc of out of range.this fix relates to some functions:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)