Skip to content

GH-50439: Add ArrowFormat::{,Large}{Binary,UTF8}Array.new(values)#50452

Merged
kou merged 1 commit into
apache:mainfrom
Reranko05:gh-50439-binary-array-new
Jul 10, 2026
Merged

GH-50439: Add ArrowFormat::{,Large}{Binary,UTF8}Array.new(values)#50452
kou merged 1 commit into
apache:mainfrom
Reranko05:gh-50439-binary-array-new

Conversation

@Reranko05

@Reranko05 Reranko05 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Building variable-size binary Arrow arrays from Ruby objects is convenient.

What changes are included in this PR?

Accept:

  • ArrowFormat::BinaryArray.new(values)
  • ArrowFormat::LargeBinaryArray.new(values)
  • ArrowFormat::UTF8Array.new(values)
  • ArrowFormat::LargeUTF8Array.new(values)

Are these changes tested?

Yes.

Added tests for:

  • initialization
  • mixed values with nil
  • equality
  • sliced arrays

Are there any user-facing changes?

Yes.

Copilot AI review requested due to automatic review settings July 9, 2026 16:23
@Reranko05 Reranko05 requested a review from kou as a code owner July 9, 2026 16:23
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

⚠️ GitHub issue #50439 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.

Pull request overview

Adds Ruby-side convenience construction for variable-size binary and UTF-8 ArrowFormat arrays by allowing ArrowFormat::{,Large}{Binary,UTF8}Array.new(values) to build the underlying buffers directly from a Ruby values list.

Changes:

  • Extend VariableSizeBinaryArray initialization to accept a single values argument and build validity/offsets/values buffers internally.
  • Add new test coverage for initialization and equality behavior (including sliced arrays) across Binary/LargeBinary/UTF8/LargeUTF8 array classes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
ruby/red-arrow-format/lib/arrow-format/array.rb Adds new(values) support by building buffers for variable-size binary/UTF8 arrays.
ruby/red-arrow-format/test/test-binary-array.rb Introduces tests covering construction and equality (including slicing) for the new initializer behavior.

Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb
Copilot AI review requested due to automatic review settings July 9, 2026 16:32
@Reranko05 Reranko05 force-pushed the gh-50439-binary-array-new branch from b50f0cd to 962d0d1 Compare July 9, 2026 16:32

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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Jul 9, 2026
@github-actions

Copy link
Copy Markdown

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

Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb
Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb Outdated
Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb Outdated
Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb Outdated
Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb
Comment thread ruby/red-arrow-format/test/test-binary-array.rb Outdated
Comment thread ruby/red-arrow-format/test/test-binary-array.rb Outdated
@github-actions github-actions Bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Jul 10, 2026
Copilot AI review requested due to automatic review settings July 10, 2026 03:11
@Reranko05 Reranko05 force-pushed the gh-50439-binary-array-new branch from 962d0d1 to da499a5 Compare July 10, 2026 03:11
@github-actions github-actions Bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jul 10, 2026

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.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread ruby/red-arrow-format/lib/arrow-format/type.rb Outdated
Comment thread ruby/red-arrow-format/lib/arrow-format/type.rb Outdated
Copilot AI review requested due to automatic review settings July 10, 2026 03:48
@Reranko05 Reranko05 force-pushed the gh-50439-binary-array-new branch from da499a5 to cd25366 Compare July 10, 2026 03:48

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

+1

Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb
Comment thread ruby/red-arrow-format/lib/arrow-format/array.rb Outdated
Comment thread ruby/red-arrow-format/lib/arrow-format/type.rb Outdated
@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Jul 10, 2026
Signed-off-by: Aaditya Srinivasan <aadityasri03@gmail.com>
Copilot AI review requested due to automatic review settings July 10, 2026 04:53
@Reranko05 Reranko05 force-pushed the gh-50439-binary-array-new branch from cd25366 to 67fd826 Compare July 10, 2026 04:53

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@kou kou merged commit 7ca702c into apache:main Jul 10, 2026
36 checks passed
@kou kou removed the awaiting merge Awaiting merge label Jul 10, 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.

3 participants