apache / apache/arrow

[C++] Kernel to construct MonthDayNanoInterval array from separate arrays of months/days/nanos

Open
#34,824 0 comments 1 reaction 0 assignees View on GitHub
Component: C++ good-second-issue
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 18h
Merged PRs (30d)
91

Description

Currently it's not straightforward to construct a MonthDayNanoIntervalArray from existing data. The python layer adds conversion from timedelta/relativedelta/tuples of ints, but so that's only for generic python->arrow conversion, not if you already have arrow data. For example, converting an array of integers that represents the number of days to an interval array.

Proposal: a scalar kernel that can construct an interval array from its parts (eg `month_day_nano_interval_from_parts(months, days, nanos)`, so where each of the months/days/nanos parts can be an array or a scalar.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Arrow scalar-kernel machinery and the Python conversion layer for MonthDayNanoInterval values. Define the behavior for months, days, and nanos supplied as arrays or scalars, then verify that the kernel constructs the expected MonthDayNanoIntervalArray.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
data-engineering
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.