Skip to content

[C++] Implement week kernel that accepts WeekOptions #29210

@asfimport

Description

@asfimport

Arrow has an iso_week compute kernel that follows the ISO 8601 week date definition. Add another kernel (maybe named week) that lets you specify options for how exactly to count weeks, like MySQL's week function: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html#function_week.

I think we can reuse the existing DayOfWeekOptions to specify the options, but we should change the description of the one_based_numbering argument to:

Number from 1 if true and from 0 if false.
removing the word "days" from it, so it can control whether days or weeks are numbered starting from 0 or 1 depending on where it's used.

Reporter: Ian Cook / @ianmcook
Assignee: Rok Mihevc / @rok
Watchers: Rok Mihevc / @rok

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-13561. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions