Skip to content

GH-54571: [GLib] Add support for returning string view array from C++ - #54572

Merged
kou merged 1 commit into
apache:mainfrom
kou:glib-string-view-array
Oct 19, 2026
Merged

kou merged 1 commit into
apache:mainfrom
kou:glib-string-view-array

Conversation

@kou

@kou kou commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Rationale for this change

garrow_array_new_raw_valist() misses string view array detection. If we miss it, we can't return a string view array from C++ to GLib.

What changes are included in this PR?

Add missing string view array detection.

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

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:

  • Human
  • AI

Reviewed before submission by:

  • Human
  • AI
  • Not reviewed

Copilot AI balanced review requested due to automatic review settings October 19, 2026 02:01
@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #54571 has been automatically assigned in GitHub to PR creator.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused fix follows existing dispatch patterns and includes regression coverage; tests were not executed.

No open issues 🎉

What changed in this PR

Fixes the GLib wrapper dispatch that caused Ruby casts to string_view to abort, addressing #54571.

Changes:

  • Maps C++ string-view arrays to GArrowStringViewArray.
  • Adds a regression test covering wrapper type, values, and nulls.
  • Corrects two type names in documentation comments.
File Description
c_glib/​test/​test-cast.rb Adds string-view cast regression coverage.
c_glib/​arrow-glib/​basic-array.cpp Adds string-view dispatch and corrects documentation names.

Review effort: Balanced

@kou

kou commented Oct 19, 2026

Copy link
Copy Markdown
Member Author

+1

Confirmed: #54571 (comment)

@kou
kou merged commit f098851 into apache:main Oct 19, 2026
36 checks passed
@kou
kou deleted the glib-string-view-array branch October 19, 2026 07:29
@kou kou removed the awaiting committer review Awaiting committer review label Oct 19, 2026
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.

2 participants