Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ruby] Arrow::Column#size doesn't work for Arrow::RecordBatch #45119

Closed
kou opened this issue Dec 29, 2024 · 1 comment
Closed

[Ruby] Arrow::Column#size doesn't work for Arrow::RecordBatch #45119

kou opened this issue Dec 29, 2024 · 1 comment

Comments

@kou
Copy link
Member

kou commented Dec 29, 2024

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

require "arrow"
Arrow::RecordBatch.new({"a" => [1, 2, 3]}).columns[0].size
/tmp/local/lib/ruby/gems/3.4.0+1/gems/red-arrow-19.0.0.SNAPSHOT/lib/arrow/column.rb:62:in 'Arrow::Column#n_rows': undefined method 'n_rows' for an instance of Arrow::UInt8Array (NoMethodError)

      @data.n_rows
           ^^^^^^^
	from /tmp/a.rb:2:in '<main>'

Component(s)

Ruby

@kou kou added the Type: bug label Dec 29, 2024
kou added a commit to kou/arrow that referenced this issue Dec 31, 2024
It's available on both of `Arrow::Array` and `Arrow::ChunkedArray`.
kou added a commit that referenced this issue Dec 31, 2024
### Rationale for this change

`#n_rows` is available only on `Arrow::ChunkedArray`. It's not available on `Arrow::Array`.

### What changes are included in this PR?

It's available on both of `Arrow::Array` and `Arrow::ChunkedArray`.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

Yes.
* GitHub Issue: #45119

Authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
@kou kou added this to the 19.0.0 milestone Dec 31, 2024
@kou
Copy link
Member Author

kou commented Dec 31, 2024

Issue resolved by pull request 45133
#45133

@kou kou closed this as completed Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant