Uh oh!
There was an error while loading. Please reload this page.
[Fix](timezone) Fix incorrect DST handling - #51454
Conversation
zclllyybb
commented
Jun 3, 2025
run buildall |
Thearas
commented
Jun 3, 2025
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
zclllyybb
commented
Jun 3, 2025
run performance |
zclllyybb
commented
Jun 23, 2025
run buildall |
hello-stephen
commented
Jun 23, 2025
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jun 23, 2025
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
zclllyybb
commented
Jun 23, 2025
run buildall |
doris-robot
commented
Jun 24, 2025
TPC-H: Total hot run time: 33743 ms |
doris-robot
commented
Jun 24, 2025
TPC-H: Total hot run time: 34422 ms |
doris-robot
commented
Jun 24, 2025
TPC-DS: Total hot run time: 186236 ms |
doris-robot
commented
Jun 24, 2025
ClickBench: Total hot run time: 29.98 s |
doris-robot
commented
Jun 24, 2025
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
hello-stephen
commented
Jun 24, 2025
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
1 similar comment
hello-stephen
commented
Jun 24, 2025
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the incorrect handling of daylight saving time in datetime conversions by updating conversion logic, expected outputs, and regression tests. Key changes include adding new test cases for DST and non-DST scenarios, updating expected outputs in several test files, and refactoring the datetime conversion implementation for more reliable DST handling.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| regression-test/suites/datatype_p0/datetimev2/test_timezone.groovy | Added regression tests for DST and non-DST timezone conversions. |
| regression-test/data/datatype_p0/datetimev2/test_tz_streamload.out | Updated expected output timestamp for streamload tests. |
| regression-test/data/datatype_p0/datetimev2/test_timezone.out | Modified expected output for timezone tests to reflect DST adjustments. |
| regression-test/data/cast_p0/cast_to_datetime.out | Adjusted expected output timestamps in datetime cast tests. |
| be/test/vec/function/function_test_util.h | Enhanced error output for function result mismatches. |
| be/test/vec/function/cast/cast_to_datetime_test.cpp | Updated test expectations to match new timezone handling. |
| be/test/vec/function/cast/cast_to_date_test.cpp | Revised expected outputs in date cast tests to align with new timezone logic. |
| be/src/vec/runtime/vdatetime_value.h | Fixed uninitialized variable issues in datetime comparison operators. |
| be/src/vec/runtime/vdatetime_value.cpp | Refactored DST conversion logic and updated type handling for timezone offsets. |
| be/src/olap/rowset/segment_v2/inverted_index/util/priority_queue.h | Cleaned up redundant max_size validation for the priority queue. |
Uh oh!
There was an error while loading. Please reload this page.
PR approved by anyone and no changes requested. |
Problem Summary:
before:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 15:15:30 |
+------------------------------------------------------+
1 row in set (0.19 sec)
```
now:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 16:15:30 |
+------------------------------------------------------+
1 row in set (0.12 sec)
```Problem Summary:
before:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 15:15:30 |
+------------------------------------------------------+
1 row in set (0.19 sec)
```
now:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 16:15:30 |
+------------------------------------------------------+
1 row in set (0.12 sec)
```Problem Summary:
before:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 15:15:30 |
+------------------------------------------------------+
1 row in set (0.19 sec)
```
now:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 16:15:30 |
+------------------------------------------------------+
1 row in set (0.12 sec)
```Problem Summary:
before:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 15:15:30 |
+------------------------------------------------------+
1 row in set (0.19 sec)
```
now:
```sql
mysql> select/*+SET_VAR(debug_skip_fold_constant=true)*/ cast('2010-01-05 08:15:30Europe/London' as datetime);
+------------------------------------------------------+
| cast('2010-01-05 08:15:30Europe/London' as datetime) |
+------------------------------------------------------+
| 2010-01-05 16:15:30 |
+------------------------------------------------------+
1 row in set (0.12 sec)
```
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
before:
now:
Release note
Fix incorrect daylight saving time handling
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)