You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "heronshoes (via GitHub)" <gi...@apache.org> on 2023/04/07 02:36:50 UTC

[GitHub] [arrow] heronshoes opened a new issue, #34953: [Ruby] `Table.slice` uses `:emit_null` not `:drop` for `FilterOptions`

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: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] kou closed issue #34953: [Ruby] `Table.slice` uses `:emit_null` not `:drop` for `FilterOptions`

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #34953: [Ruby] `Table.slice` uses `:emit_null` not `:drop` for `FilterOptions`
URL: https://github.com/apache/arrow/issues/34953


-- 
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: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] heronshoes commented on issue #34953: [Ruby] `Table.slice` uses `:emit_null` not `:drop` for `FilterOptions`

Posted by "heronshoes (via GitHub)" <gi...@apache.org>.
heronshoes commented on issue #34953:
URL: https://github.com/apache/arrow/issues/34953#issuecomment-1501293527

   Thhanks!


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org