Rename weekday
and weekday0
kernels to to num_days_from_monday
and num_days_since_sunday
#2066
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #2065
Rationale for this change
Depending on the usecase sometimes one wants the days of week to start from Sunday or Monday. Dates 🤷
@ovr added the
weekday0
kernel in #2052But now the names are
weekday
andweekday0
which I think might be confusing to the average readerWhat changes are included in this PR?
Rename the kernels to follow the chrono naming scheme
num_days_from_sunday
andnum_days_from_monday
https://docs.rs/chrono/0.4.19/chrono/enum.Weekday.html#method.num_days_from_sunday
https://docs.rs/chrono/0.4.19/chrono/enum.Weekday.html#method.num_days_from_monday
Are there any user-facing changes?
Yes, name of the
compute::kernels::temporal::weekday
(which is present in arrow 18) is renamed tocompute::kernels::temporal::num_days_since_monday