Enhance record batch API with UTF8 and date/time support - #100
Merged
Conversation
yuvimittal
marked this pull request as ready for review
July 28, 2026 12:56
yogendra-17
force-pushed
the
feat/arrow-temporal-types
branch
from
July 28, 2026 13:43
59be155 to
3123332
Compare
yogendra-17
force-pushed
the
feat/arrow-temporal-types
branch
from
July 28, 2026 14:11
3123332 to
34b1d6e
Compare
11 tasks
yuvimittal
reviewed
Jul 30, 2026
| case IRX_COL_DATE32: | ||
| st = static_cast<arrow::Date32Builder *>( | ||
| b->builders[col].get()) | ||
| ->Append(static_cast<int32_t>(v)); |
Member
There was a problem hiding this comment.
If v overflows int32_t (e.g. a millisecond-epoch value passed by mistake) data is silently corrupted. Add a bounds check: if (v < INT32_MIN || v > INT32_MAX) return set_err("value out of int32 range", IRX_ERR_OOB); before the cast.
| case IRX_COL_TIME32_MS: | ||
| st = static_cast<arrow::Time32Builder *>( | ||
| b->builders[col].get()) | ||
| ->Append(static_cast<int32_t>(v)); |
Member
There was a problem hiding this comment.
Same silent narrowing issue as in append_date. Needs the same overflow guard.
yogendra-17
force-pushed
the
feat/arrow-temporal-types
branch
from
August 1, 2026 13:00
7c2773f to
ecf2758
Compare
Member
|
@yogendra-17 , thanks for working on this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request description
Draft. Extends IRX Arrow C++ record batch bridge with:
utf8,large_utf8.date32,date64,time32(s|ms),time64(us|ns),timestamp(s|ms|us|ns).Files:
packages/irx/src/irx/builder/runtime/arrow/native/irx_record_batch.{h,cpp}— native builders/getters.packages/irx/src/irx/builder/runtime/record_batch.py— registry.packages/irx/src/irx/record_batch.py— high-level API +_date_to_int/_datetime_to_int/_time_to_inthelpers.
packages/irx/tests/test_record_batch.py— tests.Note: Overlaps with open PR #93 until it merges.
How to test these changes
pytest packages/irx/tests/test_record_batch.py -v...Pull Request checklists
This PR is a:
About this PR:
Author's checklist:
complexity.
Additional information
Reviewer's checklist
Copy and paste this template for your review's note: