-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[branch-2.1](function) fix wrong result when convert_tz is out of bound (#37358) #38313
Conversation
…che#37358) ## Proposed changes Issue Number: close #xxx before: ```sql mysql> select CONVERT_TZ(cast('0000-01-01 00:00:00.00001' as DATETIMEV1), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533))); +---------------------------------------------------------------------------------------------------------------------------------------------------+ | convert_tz(cast('0000-01-01 00:00:00.00001' as DATETIME), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533))) | +---------------------------------------------------------------------------------------------------------------------------------------------------+ | q535-12-31 08:01:19 | +---------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.12 sec) ``` now: ```sql mysql> select CONVERT_TZ(cast('0000-01-01 00:00:00.00001' as DATETIMEV1), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533))); +---------------------------------------------------------------------------------------------------------------------------------------------------+ | convert_tz(cast('0000-01-01 00:00:00.00001' as DATETIME), cast('Asia/Shanghai' as VARCHAR(65533)), cast('America/Los_Angeles' as VARCHAR(65533))) | +---------------------------------------------------------------------------------------------------------------------------------------------------+ | NULL | +---------------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.09 sec) ```
run buildall |
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
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.
clang-tidy made some suggestions
@@ -18,19 +18,15 @@ | |||
#pragma once | |||
|
|||
#include <cctz/time_zone.h> |
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.
warning: 'cctz/time_zone.h' file not found [clang-diagnostic-error]
#include <cctz/time_zone.h>
^
TeamCity be ut coverage result: |
Proposed changes
pick #37358
before:
now: