-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](Nereids) time extract function constant folding core
some time extract function changed return type in the previous PR #18369 but it is not change FE constant folding function signature. This is let them have same signature to avoid BE core.
- Loading branch information
Showing
3 changed files
with
164 additions
and
68 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
61 changes: 61 additions & 0 deletions
61
regression-test/data/nereids_function_p0/constant_folding.out
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
-- This file is automatically generated. You should know what you did if you want to edit this | ||
-- !constant_folding -- | ||
0 | ||
|
||
-- !constant_folding_2 -- | ||
0 | ||
|
||
-- !constant_folding_3 -- | ||
2000 | ||
|
||
-- !constant_folding_4 -- | ||
2000 | ||
|
||
-- !constant_folding_5 -- | ||
1 | ||
|
||
-- !constant_folding_6 -- | ||
1 | ||
|
||
-- !constant_folding_7 -- | ||
1 | ||
|
||
-- !constant_folding_8 -- | ||
1 | ||
|
||
-- !constant_folding_9 -- | ||
2 | ||
|
||
-- !constant_folding_10 -- | ||
2 | ||
|
||
-- !constant_folding_11 -- | ||
2 | ||
|
||
-- !constant_folding_12 -- | ||
2 | ||
|
||
-- !constant_folding_13 -- | ||
2 | ||
|
||
-- !constant_folding_14 -- | ||
2 | ||
|
||
-- !constant_folding_15 -- | ||
1 | ||
|
||
-- !constant_folding_16 -- | ||
1 | ||
|
||
-- !constant_folding_17 -- | ||
1 | ||
|
||
-- !constant_folding_18 -- | ||
2 | ||
|
||
-- !constant_folding_19 -- | ||
3 | ||
|
||
-- !constant_folding_20 -- | ||
400 | ||
|
33 changes: 33 additions & 0 deletions
33
regression-test/suites/nereids_function_p0/constant_folding.sql
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
set enable_nereids_planner=true; | ||
set enable_fallback_to_original_planner=false; | ||
|
||
-- time series | ||
|
||
select year('2000-01-02 01:02:03.0004'); | ||
select year('2000-01-02'); | ||
|
||
select quarter('2000-01-02 01:02:03.0004'); | ||
select quarter('2000-01-02'); | ||
|
||
select month('2000-01-02 01:02:03.0004'); | ||
select month('2000-01-02'); | ||
|
||
select day('2000-01-02 01:02:03.0004'); | ||
select day('2000-01-02'); | ||
|
||
select dayofyear('2000-01-02 01:02:03.0004'); | ||
select dayofyear('2000-01-02'); | ||
|
||
select dayofmonth('2000-01-02 01:02:03.0004'); | ||
select dayofmonth('2000-01-02'); | ||
|
||
select dayofweek('2000-01-02 01:02:03.0004'); | ||
select dayofweek('2000-01-02'); | ||
|
||
select hour('2000-01-02 01:02:03.0004'); | ||
|
||
select minute('2000-01-02 01:02:03.0004'); | ||
|
||
select second('2000-01-02 01:02:03.0004'); | ||
|
||
select microsecond('2000-01-02 01:02:03.0004'); |