feat(c-glib): add fixed and variable closedness range GLib bindings - #2
Draft
hoeze-minion wants to merge 2 commits into
Draft
hoeze-minion wants to merge 2 commits into
hoeze-minion wants to merge 2 commits into
Conversation
hoeze-minion
force-pushed
the
feat/arrow-range-glib
branch
2 times, most recently
from
May 24, 2026 12:59
f7a80a3 to
9b4b101
Compare
hoeze-minion
force-pushed
the
feat/arrow-range-extension
branch
from
May 24, 2026 13:04
8198463 to
8f1d3aa
Compare
hoeze-minion
force-pushed
the
feat/arrow-range-glib
branch
from
May 24, 2026 13:04
9b4b101 to
2af30d1
Compare
hoeze-minion
force-pushed
the
feat/arrow-range-extension
branch
from
September 13, 2026 00:24
f3ec0b6 to
c414320
Compare
hoeze-minion
force-pushed
the
feat/arrow-range-glib
branch
from
September 26, 2026 20:11
edf8573 to
b4638c7
Compare
hoeze-minion
force-pushed
the
feat/arrow-range-extension
branch
from
September 26, 2026 21:38
5ff2abd to
ffcfd4d
Compare
hoeze-minion
force-pushed
the
feat/arrow-range-glib
branch
from
September 26, 2026 21:38
b4638c7 to
a61e541
Compare
Add GArrowFixedClosednessRangeDataType, the GLib binding for the arrow.fixed_closedness_range canonical extension type: a bounded interval over an orderable value type, with the inclusivity of its bounds fixed at the type level via the GArrowRangeClosed enum. Also adds a Ruby test covering construction, value_type, closed, the extension name, and the C++ round-trip.
Add GArrowVariableClosednessRangeDataType, the GLib binding for the arrow.variable_closedness_range canonical extension type. The inclusivity of each bound is stored per value, so construction takes no closed argument. A Ruby test covers construction, value_type, the extension name, and the C++ round trip.
hoeze-minion
force-pushed
the
feat/arrow-range-glib
branch
from
September 26, 2026 22:24
a61e541 to
364266e
Compare
|
Thanks for opening a pull request! This pull request has been automatically converted to a draft because its title doesn't match Arrow's required format. If this is not a minor PR, could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or After updating the title, you can mark the pull request as ready for review. See also: |
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.
Summary
Add Arrow GLib (C) bindings for the two range canonical extension types,
arrow.fixed_closedness_rangeandarrow.variable_closedness_range.This is stacked on the branch
feat/arrow-range-extension(apache#50028), which carries the C++/Python/spec work. Review and merge
that first; the diff here is only the GLib layer.
Changes
c_glib/arrow-glib/basic-data-type.{h,cpp}:GArrowRangeClosedenum (left/right/both/neither), mirroringarrow::extension::RangeClosed.GArrowFixedClosednessRangeDataType, wrappingarrow::extension::FixedClosednessRangeType. Providesgarrow_fixed_closedness_range_data_type_new(value_type, closed, allow_unbounded)plus
get_value_type/get_closedaccessors.GArrowVariableClosednessRangeDataType, wrappingarrow::extension::VariableClosednessRangeType. Providesgarrow_variable_closedness_range_data_type_new(value_type, allow_unbounded)plus a
get_value_typeaccessor. It takes noclosedargument, becauseeach value stores its own inclusivity.
garrow_data_type_new_raw.GARROW_AVAILABLE_IN_26_0/Since: 26.0.0.Modeled on the existing
GArrowFixedShapeTensorDataType(parameterized) andGArrowUUIDDataType(extension base).c_glib/test/test-fixed-closedness-range-data-type.rbandc_glib/test/test-variable-closedness-range-data-type.rb: Ruby tests forthe GLib types.
Testing
Built arrow-glib against a local Arrow C++ install and ran the in-tree Ruby
test harness:
TestFixedClosednessRangeDataType: 11 / 11 pass (id, name, value_type,closed, to_s, all four
closedvalues, theallow_unbounded=falsepath, anda C++ round trip through
Schema/Field).TestVariableClosednessRangeDataType: 6 / 6 pass (id, name, value_type,to_s, the
allow_unbounded=falsepath, and the C++ round trip).The full c_glib suite has no failures. Its only errors are pre-existing
missing-codec cases (gzip and zstd are not built in this C++ install), which
are unrelated to this change.
Note
Building arrow-glib requires the underlying Arrow C++ to be built with
-DARROW_ACERO=ON, sincec_glibhard-requiresarrow-acero.Was AI used for this PR?
PR code and description written by:
Reviewed before submission by:
Note that I made heavy use of AI to create this PR and copied many structures
from the existing
GArrowFixedShapeTensorDataTypeandGArrowUUIDDataType.I reviewed each change and hope the changes I made are meaningful.