forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix](function) fix FE impl of some time functions (apache#37746)
before: ```sql mysql> select date_ceil("2020-12-12 12:12:12.123", interval 2 second); +-----------------------+ | '2020-12-12 12:12:12' | +-----------------------+ | 2020-12-12 12:12:12 | +-----------------------+ 1 row in set (0.10 sec) mysql> select CONVERT_TZ('9999-12-31 23:59:59.999999', 'Pacific/Galapagos', 'Pacific/Galapagos'); +------+ | NULL | +------+ | NULL | +------+ 1 row in set (0.09 sec) mysql [(none)]>select CONVERT_TZ('9999-12-31 23:59:59.999999', 'Pacific/Galapagos', 'Pacific/GalapaGoS'); +-----------------------------------------------------------------------------------------------------------+ | convert_tz(cast('9999-12-31 23:59:59.999999' as DATETIMEV2(6)), 'Pacific/Galapagos', 'Pacific/GalapaGoS') | +-----------------------------------------------------------------------------------------------------------+ | 9999-12-31 23:59:59.999999 | +-----------------------------------------------------------------------------------------------------------+ 1 row in set (0.08 sec) --- gone to BE ``` after: ```sql mysql> select date_ceil("2020-12-12 12:12:12.123", interval 2 second); +------------------------------+ | '2020-12-12 12:12:14.000000' | +------------------------------+ | 2020-12-12 12:12:14 | +------------------------------+ 1 row in set (0.11 sec) mysql> select CONVERT_TZ('9999-12-31 23:59:59.999999', 'Pacific/Galapagos', 'Pacific/Galapagos'); +-----------------------------------------------------------------------------------------------------------+ | convert_tz(cast('9999-12-31 23:59:59.999999' as DATETIMEV2(6)), 'Pacific/Galapagos', 'Pacific/Galapagos') | +-----------------------------------------------------------------------------------------------------------+ | 9999-12-31 23:59:59.999999 | +-----------------------------------------------------------------------------------------------------------+ 1 row in set (0.23 sec) mysql> select CONVERT_TZ('9999-12-31 23:59:59.999999', 'Pacific/Galapagos', 'Pacific/GalapaGoS'); +------------------------------+ | '9999-12-31 23:59:59.999999' | +------------------------------+ | 9999-12-31 23:59:59.999999 | +------------------------------+ 1 row in set (0.11 sec) --- finished in FE ```
- Loading branch information
Showing
8 changed files
with
97 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,37 @@ | ||
-- This file is automatically generated. You should know what you did if you want to edit this | ||
-- !select1 -- | ||
-- !select10 -- | ||
-07:00:00 | ||
|
||
-- !select2 -- | ||
-07:00:00 | ||
-- !select11 -- | ||
2020-02-02T04:00 | ||
|
||
-- !select12 -- | ||
2020-05-02T03:00 | ||
|
||
-- !select13 -- | ||
9999-12-31T23:59:59.999999 | ||
|
||
-- !select3 -- | ||
-- !select20 -- | ||
-07:00:00 | ||
|
||
-- !select4 -- | ||
-- !select21 -- | ||
2020-02-02T04:00 | ||
|
||
-- !select22 -- | ||
2020-05-02T03:00 | ||
|
||
-- !select23 -- | ||
9999-12-31T23:59:59.999999 | ||
|
||
-- !select20 -- | ||
-07:00:00 | ||
|
||
-- !select21 -- | ||
2020-02-02T04:00 | ||
|
||
-- !select22 -- | ||
2020-05-02T03:00 | ||
|
||
-- !select23 -- | ||
9999-12-31T23:59:59.999999 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters