Class: ArrowFormat::UTF8Type

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



675
676
677
# File 'lib/arrow-format/type.rb', line 675

def singleton
  @singleton ||= new
end

Instance Method Details

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



692
693
694
# File 'lib/arrow-format/type.rb', line 692

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

#encodingObject



688
689
690
# File 'lib/arrow-format/type.rb', line 688

def encoding
  Encoding::UTF_8
end

#nameObject



680
681
682
# File 'lib/arrow-format/type.rb', line 680

def name
  "UTF8"
end

#offset_buffer_typeObject



684
685
686
# File 'lib/arrow-format/type.rb', line 684

def offset_buffer_type
  :s32 # TODO: big endian support
end

#to_flatbuffersObject



696
697
698
# File 'lib/arrow-format/type.rb', line 696

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