Skip to content

Commit

Permalink
Merge pull request #2309 from GrapeBaBa/issue_853_hms
Browse files Browse the repository at this point in the history
[Feature]Add toHour/toMinute/ToSecond
  • Loading branch information
sundy-li authored Oct 19, 2021
2 parents 79e9009 + 735ff7d commit 5bd8765
Show file tree
Hide file tree
Showing 6 changed files with 532 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/functions/src/scalars/dates/date.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ use super::RoundFunction;
use super::ToDayOfMonthFunction;
use super::ToDayOfWeekFunction;
use super::ToDayOfYearFunction;
use super::ToHourFunction;
use super::ToMinuteFunction;
use super::ToMonthFunction;
use super::ToSecondFunction;
use super::ToStartOfISOYearFunction;
use super::ToStartOfMonthFunction;
use super::ToStartOfQuarterFunction;
Expand Down Expand Up @@ -115,6 +118,9 @@ impl DateFunction {
factory.register("toDayOfYear", ToDayOfYearFunction::desc());
factory.register("toDayOfMonth", ToDayOfMonthFunction::desc());
factory.register("toDayOfWeek", ToDayOfWeekFunction::desc());
factory.register("toHour", ToHourFunction::desc());
factory.register("toMinute", ToMinuteFunction::desc());
factory.register("toSecond", ToSecondFunction::desc());

// rounders
factory.register("toStartOfSecond", Self::round_function_creator(1));
Expand Down
Loading

0 comments on commit 5bd8765

Please sign in to comment.