Repository navigation
GH-34824: [C++][Python] Construct month-day-nanosecond intervals from parts - #53689
michaelbawuah wants to merge 1 commit into
Conversation
|
|
|
|
1 similar comment
|
|
Rationale for this changeExisting Arrow integer columns cannot directly be assembled into a What changes are included in this PR?
Are these changes tested?The seven new C++ cases and 14 new Python cases pass. Coverage includes every The full native temporal, compute-internals and cast selections report 242 Are there any user-facing changes?There is a new C++ eager API and automatically exposed Python compute function: days = pa.array([1, 32, None], type=pa.int32())
pc.month_day_nano_interval_from_parts(0, days, 0)
# [(0, 1, 0), (0, 32, 0), None]Integer components outside their physical widths raise an error. If any Was AI used for this PR?In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR. PR code and description written by:
Reviewed before submission by:
|
|
|
Rationale for this change
Existing Arrow integer columns cannot directly be assembled into a
month-day-nanosecond interval array through the compute API. This adds the
constructor proposed in GH-34824, allowing callers to work with Arrow columns
and broadcast scalar components without assembling Python tuples.
What changes are included in this PR?
month_day_nano_interval_from_parts(months, days, nanoseconds)and theC++ eager API
MonthDayNanoIntervalFromParts.int64 nanoseconds, standard scalar broadcasting and null intersection.
preserving the supplied values without normalization.
function in the C++ compute reference and Python API index.
Are these changes tested?
The seven new C++ cases and 14 new Python cases pass. Coverage includes every
array/scalar combination, nulls, sliced validity offsets, empty/chunked inputs,
dictionary inputs, integer limits, checked overflow, rejected types, invalid
arity/lengths, and the C++ eager API.
The full native temporal, compute-internals and cast selections report 242
passed and one existing locale-dependent skip. Related Python registry and
temporal tests report 25 passed and two optional-cloudpickle skips. The Release
benchmark target builds and runs; it compares against a pre-reserved native
builder with five repeats across sizes, null densities, and broadcasting modes.
Are there any user-facing changes?
There is a new C++ eager API and automatically exposed Python compute function:
Integer components outside their physical widths raise an error. If any
component is null, the interval is null. Values such as 32 days are preserved
without being converted to months.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: