Class: ArrowFormat::LargeUTF8Type

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



703
704
705
# File 'lib/arrow-format/type.rb', line 703

def singleton
  @singleton ||= new
end

Instance Method Details

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



720
721
722
723
724
725
# File 'lib/arrow-format/type.rb', line 720

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

#encodingObject



716
717
718
# File 'lib/arrow-format/type.rb', line 716

def encoding
  Encoding::UTF_8
end

#nameObject



708
709
710
# File 'lib/arrow-format/type.rb', line 708

def name
  "LargeUTF8"
end

#offset_buffer_typeObject



712
713
714
# File 'lib/arrow-format/type.rb', line 712

def offset_buffer_type
  :s64 # TODO: big endian support
end

#to_flatbuffersObject



727
728
729
# File 'lib/arrow-format/type.rb', line 727

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