You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "michaelbawuah (via GitHub)" <gi...@apache.org> on 2026/10/13 19:00:48 UTC
[PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from… [arrow]
michaelbawuah opened a new pull request, #53689:
URL: https://github.com/apache/arrow/pull/53689
… parts
Thanks for opening a pull request!
If this is your first pull request you can find detailed information on how to contribute here:
* [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
* [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
Please remove this line and the above text before creating your pull request.
### Rationale for this change
### What changes are included in this PR?
### Are these changes tested?
### Are there any user-facing changes?
**This PR includes breaking changes to public APIs.** (If there are any breaking changes to public APIs, please explain which changes are breaking. If not, you can remove this.)
**This PR contains a "Critical Fix".** (If the changes fix either (a) a security vulnerability, (b) a bug that caused incorrect or invalid data to be produced, or (c) a bug that causes a crash (even when the API contract is upheld), please provide explanation. If not, you can remove this.)
### Was AI used for this PR?
In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [ ] Human
- [ ] AI
**Reviewed before submission by:**
- [ ] Human
- [ ] AI
- [ ] Not reviewed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from… [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #53689:
URL: https://github.com/apache/arrow/pull/53689#issuecomment-6154810507
:warning: GitHub issue #34824 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from parts [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #53689:
URL: https://github.com/apache/arrow/pull/53689#issuecomment-6155045994
:warning: GitHub issue #34824 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from… [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #53689:
URL: https://github.com/apache/arrow/pull/53689#issuecomment-6154800820
:warning: GitHub issue #34824 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from… [arrow]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #53689:
URL: https://github.com/apache/arrow/pull/53689#issuecomment-6152975215
:warning: GitHub issue #34824 **has been automatically assigned in GitHub** to PR creator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from parts [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed pull request #53689: GH-34824: [C++][Python] Construct month-day-nanosecond intervals from parts
URL: https://github.com/apache/arrow/pull/53689
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from… [arrow]
Posted by "michaelbawuah (via GitHub)" <gi...@apache.org>.
michaelbawuah commented on PR #53689:
URL: https://github.com/apache/arrow/pull/53689#issuecomment-6154945536
### 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?
- Add `month_day_nano_interval_from_parts(months, days, nanoseconds)` and the
C++ eager API `MonthDayNanoIntervalFromParts`.
- Accept integer and null inputs, with safe casts to int32 months/days and
int64 nanoseconds, standard scalar broadcasting and null intersection.
- Write interval components directly into the preallocated output buffer,
preserving the supplied values without normalization.
- Register the kernel, update CMake and Meson source lists, and document the
function in the C++ compute reference and Python API index.
- Add C++/Python contract tests and paired native-builder benchmarks.
### 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:
```python
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
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](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [ #] Human
- [ ] AI
**Reviewed before submission by:**
- [ #] Human
- [ ] AI
- [ ] Not reviewed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-34824: [C++][Python] Construct month-day-nanosecond intervals from parts [arrow]
Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou commented on PR #53689:
URL: https://github.com/apache/arrow/pull/53689#issuecomment-6263033816
AI bot, closing.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org