Class: ArrowFormat::SparseUnionArray
- Inherits:
-
UnionArray
- Object
- Array
- UnionArray
- ArrowFormat::SparseUnionArray
- Defined in:
- lib/arrow-format/array.rb
Instance Attribute Summary
Attributes inherited from UnionArray
Attributes inherited from Array
#offset, #size, #type, #validity_buffer
Instance Method Summary collapse
- #each_buffer {|slice_fixed_element_size_buffer(:types, @types_buffer, type_element_size)| ... } ⇒ Object
- #to_a ⇒ Object
Methods inherited from UnionArray
Methods inherited from Array
#empty?, #initialize, #n_nulls, #null?, #slice, #valid?
Constructor Details
This class inherits a constructor from ArrowFormat::UnionArray
Instance Method Details
#each_buffer {|slice_fixed_element_size_buffer(:types, @types_buffer, type_element_size)| ... } ⇒ Object
775 776 777 778 779 780 781 |
# File 'lib/arrow-format/array.rb', line 775 def each_buffer(&block) return to_enum(__method__) unless block_given? yield(slice_fixed_element_size_buffer(:types, @types_buffer, type_element_size)) end |
#to_a ⇒ Object
783 784 785 786 787 788 789 790 791 |
# File 'lib/arrow-format/array.rb', line 783 def to_a return [] if empty? children_values = @children.collect(&:to_a) each_type.with_index.collect do |type, i| index = @type.resolve_type_index(type) children_values[index][i] end end |