Skip to content

[Ruby] Casting to string_view aborts the process #54571

Closed

Description

@himotoyoshi

Describe the bug, including details regarding any error messages, version, and platform.

Casting an array to string_view aborts the process. The error cannot be rescued.

require "arrow"

Arrow::StringArray.new(["a", "b", "c"]).cast(Arrow::StringViewDataType.new)
# GLib-GObject-ERROR **: cannot create instance of abstract (non-instantiatable) type 'GArrowArray'
# (process exits with status 133)

Casting to binary_view works:

Arrow::BinaryArray.new(["a", "b", "c"]).cast(Arrow::BinaryViewDataType.new).class
# => Arrow::BinaryViewArray

garrow_array_new_raw_valist() in c_glib/arrow-glib/basic-array.cpp seems to have a case for BINARY_VIEW but not for STRING_VIEW.

Environment: red-arrow 25.0.1, apache-arrow-glib 25.0.1 (Homebrew), Ruby 3.4.1, macOS 15 (arm64)

Component(s)

Ruby

Activity

  1. kou commented on Oct 19, 2026

    @kou
    Member

    Thanks for your report. Could you try #54572?

  2. himotoyoshi commented on Oct 19, 2026

    @himotoyoshi
    Author

    I tried apache/arrow#54572 on top of 25.0.1, and it fixes the problem:

    irb> Arrow::StringArray.new(["a", "b", "c"]).cast(Arrow::StringViewDataType.new)
    =>
    #<Arrow::StringViewArray:0x0000000107c061f8 ptr=0x0000600002981360 [
      "a",
      "b",
      "c"
    ]>
    

    Thanks!

  3. added a commit that references this issue on Oct 19, 2026
  4. added this to the 27.0.0 milestone on Oct 19, 2026
  5. kou commented on Oct 19, 2026

    @kou
    Member

    Issue resolved by pull request 54572
    #54572

  6. kou commented on Oct 19, 2026

    @kou
    Member

    Thanks. Merged.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions