Add native support for Arrow objects in span_range
- Dominant language
- Python
- Stars
- 9.1k
- Forks
- 784
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
The span_range function typehint the start and end as datetime objects.
` def span_range(
cls,
frame: _T_FRAMES,
start: dt_datetime,
end: dt_datetime,
tz: Optional[TZ_EXPR] = None,
limit: Optional[int] = None,
bounds: _BOUNDS = "[)",
exact: bool = False,
) -> Iterable[Tuple["Arrow", "Arrow"]]`
It's will happily work with Arrow objects.
This works because the `fromdatetime` function will take an Arrow object and convert it again to an Arrow object.
I believe the correct usage it to natively support Arrow objects as input without explicitly converting an Arrow object to datetime just to be converted again internally.
Contributor guide
No contributing guide indexed for this repository
Research direction
Locate the span_range function and inspect how its start and end arguments are typed and passed to fromdatetime. Confirm the current Arrow-object behavior and identify the expected native-input path; done means Arrow objects are accepted directly without an unnecessary datetime conversion and the relevant behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100