Class: ArrowFormat::Org::Apache::Arrow::Flatbuf::Footer
- Inherits:
-
FlatBuffers::RootTable
- Object
- FlatBuffers::RootTable
- ArrowFormat::Org::Apache::Arrow::Flatbuf::Footer
- Defined in:
- lib/arrow-format/org/apache/arrow/flatbuf/footer.rb
Overview
Arrow File metadata
Constant Summary collapse
- FIELDS =
{ version: ::FlatBuffers::Field.new(:version, 0, 4, :short, 0), schema: ::FlatBuffers::Field.new(:schema, 1, 6, "::ArrowFormat::Org::Apache::Arrow::Flatbuf::Schema", 0), dictionaries: ::FlatBuffers::Field.new(:dictionaries, 2, 8, ["::ArrowFormat::Org::Apache::Arrow::Flatbuf::Block"], 0), record_batches: ::FlatBuffers::Field.new(:record_batches, 3, 10, ["::ArrowFormat::Org::Apache::Arrow::Flatbuf::Block"], 0), custom_metadata: ::FlatBuffers::Field.new(:custom_metadata, 4, 12, ["::ArrowFormat::Org::Apache::Arrow::Flatbuf::KeyValue"], 0), }
- Data =
define_data_class
Class Method Summary collapse
Instance Method Summary collapse
-
#custom_metadata ⇒ Object
User-defined metadata.
- #dictionaries ⇒ Object
- #record_batches ⇒ Object
- #schema ⇒ Object
- #version ⇒ Object
Class Method Details
.file_extension ⇒ Object
27 28 29 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/footer.rb', line 27 def file_extension "" end |
.file_identifier ⇒ Object
23 24 25 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/footer.rb', line 23 def file_identifier "" end |
Instance Method Details
#custom_metadata ⇒ Object
User-defined metadata
43 44 45 46 47 48 49 50 51 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/footer.rb', line 43 def field_offset = @view.unpack_virtual_offset(12) return nil if field_offset.zero? element_size = 4 @view.unpack_vector(field_offset, element_size) do |element_offset| @view.unpack_table(::ArrowFormat::Org::Apache::Arrow::Flatbuf::KeyValue, element_offset) end end |
#dictionaries ⇒ Object
53 54 55 56 57 58 59 60 61 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/footer.rb', line 53 def dictionaries field_offset = @view.unpack_virtual_offset(8) return nil if field_offset.zero? element_size = 24 @view.unpack_vector(field_offset, element_size) do |element_offset| @view.unpack_struct(::ArrowFormat::Org::Apache::Arrow::Flatbuf::Block, element_offset) end end |
#record_batches ⇒ Object
63 64 65 66 67 68 69 70 71 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/footer.rb', line 63 def record_batches field_offset = @view.unpack_virtual_offset(10) return nil if field_offset.zero? element_size = 24 @view.unpack_vector(field_offset, element_size) do |element_offset| @view.unpack_struct(::ArrowFormat::Org::Apache::Arrow::Flatbuf::Block, element_offset) end end |
#schema ⇒ Object
73 74 75 76 77 78 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/footer.rb', line 73 def schema field_offset = @view.unpack_virtual_offset(6) return nil if field_offset.zero? @view.unpack_table(::ArrowFormat::Org::Apache::Arrow::Flatbuf::Schema, field_offset) end |
#version ⇒ Object
80 81 82 83 84 85 86 87 88 |
# File 'lib/arrow-format/org/apache/arrow/flatbuf/footer.rb', line 80 def version field_offset = @view.unpack_virtual_offset(4) if field_offset.zero? enum_value = 0 else enum_value = @view.unpack_short(field_offset) end ::ArrowFormat::Org::Apache::Arrow::Flatbuf::MetadataVersion.try_convert(enum_value) || enum_value end |