Skip to content

GH-48888: [Ruby] Add support for writing boolean array#48889

Merged
kou merged 1 commit intoapache:mainfrom
kou:ruby-boolean-array
Jan 19, 2026
Merged

GH-48888: [Ruby] Add support for writing boolean array#48889
kou merged 1 commit intoapache:mainfrom
kou:ruby-boolean-array

Conversation

@kou
Copy link
Member

@kou kou commented Jan 19, 2026

Rationale for this change

It's a primitive array.

What changes are included in this PR?

  • Add support for 64-bit buffer alignment.
  • Add ArrowFormat::BooleanType#to_flat_buffers

Are these changes tested?

Yes.

Are there any user-facing changes?

Yes.

@github-actions
Copy link

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

Copy link
Collaborator

@hiroyuki-sato hiroyuki-sato left a comment

Choose a reason for hiding this comment

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

+1

LD_LIBRARY_PATH=/tmp/local/lib GI_TYPELIB_PATH=/tmp/local/lib/girepository-1.0 rake test
cd /path/to/arrow/ruby/red-arrow-format
/path/to/.rbenv/versions/3.4.7/bin/ruby test/run.rb
Loaded suite test
Started
/path/to/arrow/ruby/red-arrow-format/lib/arrow-format/file-reader.rb:40: warning: IO::Buffer is experimental and both the Ruby and C interface may change in the future!
Finished in 1.543011232 seconds.
-----------------------------------------------------------------------------------------------------------------------------
108 tests, 108 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
-----------------------------------------------------------------------------------------------------------------------------
69.99 tests/s, 69.99 assertions/s
cd -

module BufferAlignable
include FlatBuffers::Alignable

BUFFER_ALIGNMENT_SIZE = 64
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: What do you think about adding units like BUFFER_ALIGNMENT_BYTES or BUFFER_ALIGNMENT_BITS? (I didn't know the unit)

Copy link
Member Author

@kou kou Jan 19, 2026

Choose a reason for hiding this comment

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

Hmm. I don't think that we need it (at least for now). In general, alignment unit is bytes.

@kou kou merged commit 97c656b into apache:main Jan 19, 2026
15 checks passed
@kou kou removed the awaiting committer review Awaiting committer review label Jan 19, 2026
@kou kou deleted the ruby-boolean-array branch January 19, 2026 22:00
@github-actions github-actions bot added the awaiting changes Awaiting changes label Jan 19, 2026
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 97c656b.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

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