apache / apache/arrow

[Ruby] Table#initialize examples are out of date

Open
#26,550 9 comments 0 reactions 0 assignees View on GitHub
Component: Documentation Component: Ruby Priority: Major Status: needs champion Type: bug
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

https://www.rubydoc.info/gems/red-arrow/Arrow/Table
```ruby

count_field = Arrow::Field.new("count", :uint32)
count_array = Arrow::UInt32Array.new([0, 2, nil, 4])
count_column = Arrow::Column.new(count_field, count_array)
visible_field = Arrow::Field.new("visible", :boolean)
visible_array = Arrow::BooleanArray.new([true, nil, nil, false])
visible_column = Arrow::Column.new(visible_field, visible_array)
Arrow::Table.new(Arrow::Schema.new([count_field, visible_field]),
[count_column, visible_column])
```

```

NoMethodError (undefined method `schema' for #)
```

I would write tests but I presume that the interface has changed and the docs have been left behind. Please advise on how I could help out.

**Reporter**: [fonsan](https://issues.apache.org/jira/browse/ARROW-10587) / @Fonsan

**Note**: *This issue was originally created as [ARROW-10587](https://issues.apache.org/jira/browse/ARROW-10587). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*

Contributor guide

Open the contributing guide

Research direction

Start with the linked Ruby API documentation for Arrow::Table and the migration documentation, then reproduce the reported NoMethodError from the example. Compare the example with the current Table#initialize interface; done means the documented example runs without the reported error and reflects the current API.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.