Class: ArrowFormat::MapArray

Inherits:
VariableSizeListArray show all
Defined in:
lib/arrow-format/array.rb

Instance Attribute Summary

Attributes inherited from VariableSizeListArray

#child

Attributes inherited from Array

#offset, #size, #type, #validity_buffer

Instance Method Summary collapse

Methods inherited from VariableSizeListArray

#each_buffer, #initialize, #offsets

Methods inherited from Array

#empty?, #initialize, #n_nulls, #null?, #slice, #valid?

Constructor Details

This class inherits a constructor from ArrowFormat::VariableSizeListArray

Instance Method Details

#to_aObject



676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
# File 'lib/arrow-format/array.rb', line 676

def to_a
  return [] if empty?

  super.collect do |entries|
    if entries.nil?
      entries
    else
      hash = {}
      entries.each do |key, value|
        hash[key] = value
      end
      hash
    end
  end
end