[C++] Support Temporal Extraction Functions for duration types
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 91
Description
### Describe the enhancement requested
```
In [2]: import datetime
In [3]: import pyarrow as pa
In [4]: pa.__version__
Out[4]: '10.0.1'
In [5]: pa.compute.day(pa.array([datetime.timedelta(1)]))
ArrowNotImplementedError: Function 'day' has no kernel matching input types (duration[us])
```
Would be great to support extracting the `day`, `second`, `microseconds`, `nanoseconds` components of a timedelta
### Component(s)
Python
Contributor guide
Research direction
Start from the Python reproduction in the issue and trace the pyarrow compute implementation for temporal extraction functions. Identify how duration inputs are handled for day, second, microseconds, and nanoseconds, then add coverage showing these functions work for timedelta arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100