Skip to content

GH-51816: [GLib] Add filesystem GType registration mechanism - #55464

Open
alytantawyy wants to merge 2 commits into
apache:mainfrom
alytantawyy:fix-glib-filesystem-gtype-registration
Open

alytantawyy wants to merge 2 commits into
apache:mainfrom
alytantawyy:fix-glib-filesystem-gtype-registration

Conversation

@alytantawyy

@alytantawyy alytantawyy commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Rationale for this change

Arrow GLib currently selects filesystem wrappers from a fixed list. A registry lets separately packaged filesystem bindings provide their own GLib wrapper types, preparing for the S3 bindings split in #51608.

Closes #51816.

What changes are included in this PR?

  • Add thread-safe filesystem name-to-GType registration, with validation and duplicate-name errors.
  • Use the registry when creating wrappers and preserve the existing built-in mappings.
  • Make GArrowFileSystem constructible so an unregistered C++ filesystem can use the generic wrapper.
  • Add Ruby and native regression tests and run the native tests in CI.

Are these changes tested?

Verified locally on macOS arm64:

  • Native registry tests: 4 passed, covering built-in mappings, registered wrapper selection, usable generic fallback, and rejection of abstract wrapper types.
  • Ruby filesystem tests: 84 passed, with 12 optional Dataset tests omitted; no failures or errors.
  • The build and all applicable pre-commit hooks passed.
ninja -C c_glib.build.native -j4
meson test -C c_glib.build.native 'filesystem registry' --print-errorlogs --no-rebuild

# From c_glib.build.native:
BUILD=no BUNDLE_GEMFILE=../c_glib/Gemfile bundle exec ../c_glib/test/run-test.sh --testcase '/FileSystem/'

Are there any user-facing changes?

Adds garrow_file_system_register_type() and allows unregistered C++ filesystem implementations to be wrapped as a generic GArrowFileSystem. Existing built-in wrapper mappings remain available. Moving S3 bindings into a separate library is outside this PR's scope.

Was AI used for this PR?

Codex generated the implementation, tests, and this description, and performed an AI review and local build, test, and lint verification.

PR code and description written by:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GLib] Add filesystem GType registration mechanism

1 participant