Class: Arrow::ListSliceOptions
- Inherits:
-
Object
- Object
- Arrow::ListSliceOptions
- Defined in:
- lib/arrow/list-slice-options.rb
Constant Summary collapse
- RETURN_FIXED_SIZE_GLIB_TO_RUBY =
{ ListSliceReturnFixedSizeList::AUTO => nil, ListSliceReturnFixedSizeList::TRUE => true, ListSliceReturnFixedSizeList::FALSE => false, }.freeze
- RETURN_FIXED_SIZE_RUBY_TO_GLIB =
RETURN_FIXED_SIZE_GLIB_TO_RUBY.invert.freeze
Instance Method Summary collapse
-
#return_fixed_size_list ⇒ Object
Whether to return a FixedSizeListArray.
-
#return_fixed_size_list=(return_fixed_size_list) ⇒ Object
Whether to return a FixedSizeListArray.
-
#stop ⇒ Object
Optional stop of list slicing.
-
#stop=(stop) ⇒ Object
Optional stop of list slicing.
Instance Method Details
#return_fixed_size_list ⇒ Object
Whether to return a FixedSizeListArray. If true and stop is after a list element’s length, nil values will be appended to create the requested slice size. The default of nil will return the same type which was passed in.
36 37 38 39 40 |
# File 'lib/arrow/list-slice-options.rb', line 36 def return_fixed_size_list RETURN_FIXED_SIZE_GLIB_TO_RUBY.fetch( return_fixed_size_list_raw, return_fixed_size_list_raw) end |
#return_fixed_size_list=(return_fixed_size_list) ⇒ Object
Whether to return a FixedSizeListArray. If true and stop is after a list element’s length, nil values will be appended to create the requested slice size. The default of nil will return the same type which was passed in.
50 51 52 53 54 |
# File 'lib/arrow/list-slice-options.rb', line 50 def return_fixed_size_list=(return_fixed_size_list) self.return_fixed_size_list_raw = RETURN_FIXED_SIZE_RUBY_TO_GLIB.fetch( return_fixed_size_list, return_fixed_size_list) end |
#stop ⇒ Object
Optional stop of list slicing. If set to nil, then slice to end.
62 63 64 |
# File 'lib/arrow/list-slice-options.rb', line 62 def stop stop_raw == LIST_SLICE_OPTIONS_STOP_UNSPECIFIED ? nil : stop_raw end |
#stop=(stop) ⇒ Object
Optional stop of list slicing. If set to nil, then slice to end.
72 73 74 |
# File 'lib/arrow/list-slice-options.rb', line 72 def stop=(stop) self.stop_raw = stop.nil? ? LIST_SLICE_OPTIONS_STOP_UNSPECIFIED : stop end |