heronshoes opened a new issue, #34953:
URL: https://github.com/apache/arrow/issues/34953
### Describe the bug, including details regarding any error messages,
version, and platform.
`Table.slice` behaves as `FilterOptions.null_selection_behavior =
:emit_null` for backward compatibility.
This is a differnt behavior from `Table#filter` and
`Slicer::ColumnCondition#select`
which use default option `:drop`.
Is it better to align with default option `:drop` for `Table.slice` ?
Example:
```ruby
table = Arrow::Table.new(index: [*1..3], string: ["A", "B", nil])
=>
#<Arrow::Table:0x7fc7c71b61b0 ptr=0x5612150e1b40>
index string
0 1 A
1 2 B
2 3 (null)
```
This case:
```ruby
table.slice { |slicer| slicer.string == "A" }
=>
#<Arrow::Table:0x7fc7cf2bee10 ptr=0x5612165c5220>
index string
0 1 A
1 (null) (null)
```
Reference 1:
```ruby
table.filter([true, nil, false])
=>
#<Arrow::Table:0x7fc7cf366a48 ptr=0x561216608250>
index string
0 1 A
```
Reference 2:
```ruby
table.slice { |slicer| slicer.string.select { |value| value == "A" } }
=>
#<Arrow::Table:0x7fc7c6f7f2e8 ptr=0x5612166326e0>
index string
0 1 A
```
### Component(s)
Ruby
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]