Class: ArrowFormat::BinaryType

Inherits:
VariableSizeBinaryType show all
Defined in:
lib/arrow-format/type.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Type

#to_s

Class Method Details

.singletonObject



613
614
615
# File 'lib/arrow-format/type.rb', line 613

def singleton
  @singleton ||= new
end

Instance Method Details

#build_array(size, validity_buffer, offsets_buffer, values_buffer) ⇒ Object



630
631
632
633
634
635
# File 'lib/arrow-format/type.rb', line 630

def build_array(size, validity_buffer, offsets_buffer, values_buffer)
  BinaryArray.new(size,
                  validity_buffer,
                  offsets_buffer,
                  values_buffer)
end

#encodingObject



626
627
628
# File 'lib/arrow-format/type.rb', line 626

def encoding
  Encoding::ASCII_8BIT
end

#nameObject



618
619
620
# File 'lib/arrow-format/type.rb', line 618

def name
  "Binary"
end

#offset_buffer_typeObject



622
623
624
# File 'lib/arrow-format/type.rb', line 622

def offset_buffer_type
  :s32 # TODO: big endian support
end

#to_flatbuffersObject



637
638
639
# File 'lib/arrow-format/type.rb', line 637

def to_flatbuffers
  FB::Binary::Data.new
end