sdf-labs / sql-functions

12 stars 0 forks source link

Fill the gaps in the date_part family of functions. #58

Closed vgapeyev closed 4 days ago

vgapeyev commented 6 days ago

That is, these functions can now be called on timestamp and date or time (but not on intervals): year, month, day, day_of_month, day_of_week / dow, day_of_year / doy, hour, minute, second, millisecond.

The implementation is by calling new convenience methods for applying unary kernels to columnar values. For uniformity, this also switches a few previously-introduced implementations to these methods (year, month, day).