red-arrow-format 23.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +26 -0
- data/LICENSE.txt +202 -0
- data/NOTICE.txt +2 -0
- data/README.md +61 -0
- data/Rakefile +67 -0
- data/lib/arrow-format/array.rb +476 -0
- data/lib/arrow-format/bitmap.rb +44 -0
- data/lib/arrow-format/error.rb +34 -0
- data/lib/arrow-format/field.rb +33 -0
- data/lib/arrow-format/file-reader.rb +213 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/binary.rb +21 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/binary_view.rb +27 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/block.rb +38 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/body_compression.rb +47 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/body_compression_method.rb +31 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/bool.rb +20 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/buffer.rb +38 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/compression_type.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/date.rb +36 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/date_unit.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/decimal.rb +48 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/dictionary_batch.rb +50 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/dictionary_encoding.rb +64 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/dictionary_kind.rb +26 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/duration.rb +30 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/endianness.rb +24 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/feature.rb +46 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/field.rb +92 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/field_node.rb +43 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/fixed_size_binary.rb +27 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/fixed_size_list.rb +27 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/floating_point.rb +30 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/footer.rb +74 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/int.rb +33 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/interval.rb +30 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/interval_unit.rb +23 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/key_value.rb +36 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/large_binary.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/large_list.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/large_list_view.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/large_utf8.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/list.rb +20 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/list_view.rb +23 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/map.rb +52 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/message.rb +68 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/message_header.rb +39 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/metadata_version.rb +36 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/null.rb +21 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/precision.rb +23 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/record_batch.rb +93 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/run_end_encoded.rb +25 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/schema.rb +68 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/sparse_matrix_compressed_axis.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/sparse_matrix_index_csx.rb +96 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/sparse_tensor.rb +92 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/sparse_tensor_index.rb +29 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/sparse_tensor_index_coo.rb +93 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/sparse_tensor_index_csf.rb +129 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/struct_.rb +23 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/tensor.rb +74 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/tensor_dim.rb +38 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/time.rb +51 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/time_unit.rb +24 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/timestamp.rb +152 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/type.rb +55 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/union.rb +44 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/union_mode.rb +22 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/utf8.rb +21 -0
- data/lib/arrow-format/org/apache/arrow/flatbuf/utf8view.rb +27 -0
- data/lib/arrow-format/readable.rb +271 -0
- data/lib/arrow-format/record-batch.rb +36 -0
- data/lib/arrow-format/schema.rb +24 -0
- data/lib/arrow-format/streaming-pull-reader.rb +243 -0
- data/lib/arrow-format/streaming-reader.rb +50 -0
- data/lib/arrow-format/type.rb +704 -0
- data/lib/arrow-format/version.rb +26 -0
- data/lib/arrow-format.rb +20 -0
- data/red-arrow-format.gemspec +57 -0
- metadata +137 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# ----------------------------------------------------------------------
|
|
15
|
+
# Dictionary encoding metadata
|
|
16
|
+
# Maintained for forwards compatibility, in the future
|
|
17
|
+
# Dictionaries might be explicit maps between integers and values
|
|
18
|
+
# allowing for non-contiguous index values
|
|
19
|
+
class DictionaryKind < ::FlatBuffers::Enum
|
|
20
|
+
DENSE_ARRAY = register("DenseArray", 0)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
require_relative "../../../apache/arrow/flatbuf/time_unit"
|
|
9
|
+
|
|
10
|
+
module ArrowFormat
|
|
11
|
+
module Org
|
|
12
|
+
module Apache
|
|
13
|
+
module Arrow
|
|
14
|
+
module Flatbuf
|
|
15
|
+
class Duration < ::FlatBuffers::Table
|
|
16
|
+
def unit
|
|
17
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
18
|
+
if field_offset.zero?
|
|
19
|
+
enum_value = 1
|
|
20
|
+
else
|
|
21
|
+
enum_value = @view.unpack_short(field_offset)
|
|
22
|
+
end
|
|
23
|
+
::ArrowFormat::Org::Apache::Arrow::Flatbuf::TimeUnit.try_convert(enum_value) || enum_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# ----------------------------------------------------------------------
|
|
15
|
+
# Endianness of the platform producing the data
|
|
16
|
+
class Endianness < ::FlatBuffers::Enum
|
|
17
|
+
LITTLE = register("Little", 0)
|
|
18
|
+
BIG = register("Big", 1)
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# Represents Arrow Features that might not have full support
|
|
15
|
+
# within implementations. This is intended to be used in
|
|
16
|
+
# two scenarios:
|
|
17
|
+
# 1. A mechanism for readers of Arrow Streams
|
|
18
|
+
# and files to understand that the stream or file makes
|
|
19
|
+
# use of a feature that isn't supported or unknown to
|
|
20
|
+
# the implementation (and therefore can meet the Arrow
|
|
21
|
+
# forward compatibility guarantees).
|
|
22
|
+
# 2. A means of negotiating between a client and server
|
|
23
|
+
# what features a stream is allowed to use. The enums
|
|
24
|
+
# values here are intended to represent higher level
|
|
25
|
+
# features, additional details may be negotiated
|
|
26
|
+
# with key-value pairs specific to the protocol.
|
|
27
|
+
#
|
|
28
|
+
# Enums added to this list should be assigned power-of-two values
|
|
29
|
+
# to facilitate exchanging and comparing bitmaps for supported
|
|
30
|
+
# features.
|
|
31
|
+
class Feature < ::FlatBuffers::Enum
|
|
32
|
+
# Needed to make flatbuffers happy.
|
|
33
|
+
UNUSED = register("UNUSED", 0)
|
|
34
|
+
# The stream makes use of multiple full dictionaries with the
|
|
35
|
+
# same ID and assumes clients implement dictionary replacement
|
|
36
|
+
# correctly.
|
|
37
|
+
DICTIONARY_REPLACEMENT = register("DICTIONARY_REPLACEMENT", 1)
|
|
38
|
+
# The stream makes use of compressed bodies as described
|
|
39
|
+
# in Message.fbs.
|
|
40
|
+
COMPRESSED_BODY = register("COMPRESSED_BODY", 2)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
require_relative "../../../apache/arrow/flatbuf/key_value"
|
|
9
|
+
require_relative "../../../apache/arrow/flatbuf/dictionary_encoding"
|
|
10
|
+
require_relative "../../../apache/arrow/flatbuf/type"
|
|
11
|
+
|
|
12
|
+
module ArrowFormat
|
|
13
|
+
module Org
|
|
14
|
+
module Apache
|
|
15
|
+
module Arrow
|
|
16
|
+
module Flatbuf
|
|
17
|
+
# ----------------------------------------------------------------------
|
|
18
|
+
# A field represents a named column in a record / row batch or child of a
|
|
19
|
+
# nested type.
|
|
20
|
+
class Field < ::FlatBuffers::Table
|
|
21
|
+
# children apply only to nested data types like Struct, List and Union. For
|
|
22
|
+
# primitive types children will have length 0.
|
|
23
|
+
def children
|
|
24
|
+
field_offset = @view.unpack_virtual_offset(14)
|
|
25
|
+
return nil if field_offset.zero?
|
|
26
|
+
|
|
27
|
+
element_size = 4
|
|
28
|
+
@view.unpack_vector(field_offset, element_size) do |element_offset|
|
|
29
|
+
@view.unpack_table(::ArrowFormat::Org::Apache::Arrow::Flatbuf::Field, element_offset)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# User-defined metadata
|
|
34
|
+
def custom_metadata
|
|
35
|
+
field_offset = @view.unpack_virtual_offset(16)
|
|
36
|
+
return nil if field_offset.zero?
|
|
37
|
+
|
|
38
|
+
element_size = 4
|
|
39
|
+
@view.unpack_vector(field_offset, element_size) do |element_offset|
|
|
40
|
+
@view.unpack_table(::ArrowFormat::Org::Apache::Arrow::Flatbuf::KeyValue, element_offset)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Present only if the field is dictionary encoded.
|
|
45
|
+
def dictionary
|
|
46
|
+
field_offset = @view.unpack_virtual_offset(12)
|
|
47
|
+
return nil if field_offset.zero?
|
|
48
|
+
|
|
49
|
+
@view.unpack_table(::ArrowFormat::Org::Apache::Arrow::Flatbuf::DictionaryEncoding, field_offset)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
# Name is not required (e.g., in a List)
|
|
53
|
+
def name
|
|
54
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
55
|
+
return nil if field_offset.zero?
|
|
56
|
+
|
|
57
|
+
@view.unpack_string(field_offset)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Whether or not this field can contain nulls. Should be true in general.
|
|
61
|
+
def nullable?
|
|
62
|
+
field_offset = @view.unpack_virtual_offset(6)
|
|
63
|
+
return false if field_offset.zero?
|
|
64
|
+
|
|
65
|
+
@view.unpack_bool(field_offset)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# This is the type of the decoded value if the field is dictionary encoded.
|
|
69
|
+
def type
|
|
70
|
+
type = type_type
|
|
71
|
+
return nil if type.nil?
|
|
72
|
+
|
|
73
|
+
field_offset = @view.unpack_virtual_offset(10)
|
|
74
|
+
return nil if field_offset.zero?
|
|
75
|
+
@view.unpack_union(type.table_class, field_offset)
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
def type_type
|
|
79
|
+
field_offset = @view.unpack_virtual_offset(8)
|
|
80
|
+
if field_offset.zero?
|
|
81
|
+
enum_value = 0
|
|
82
|
+
else
|
|
83
|
+
enum_value = @view.unpack_utype(field_offset)
|
|
84
|
+
end
|
|
85
|
+
::ArrowFormat::Org::Apache::Arrow::Flatbuf::Type.try_convert(enum_value) || enum_value
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Message.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# ----------------------------------------------------------------------
|
|
15
|
+
# Data structures for describing a table row batch (a collection of
|
|
16
|
+
# equal-length Arrow arrays)
|
|
17
|
+
# Metadata about a field at some level of a nested type tree (but not
|
|
18
|
+
# its children).
|
|
19
|
+
#
|
|
20
|
+
# For example, a List<Int16> with values `[[1, 2, 3], null, [4], [5, 6], null]`
|
|
21
|
+
# would have {length: 5, null_count: 2} for its List node, and {length: 6,
|
|
22
|
+
# null_count: 0} for its Int16 node, as separate FieldNode structs
|
|
23
|
+
class FieldNode < ::FlatBuffers::Struct
|
|
24
|
+
# The number of value slots in the Arrow array at this level of a nested
|
|
25
|
+
# tree
|
|
26
|
+
def length
|
|
27
|
+
field_offset = 0
|
|
28
|
+
@view.unpack_long(field_offset)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# The number of observed nulls. Fields with null_count == 0 may choose not
|
|
32
|
+
# to write their physical validity bitmap out as a materialized buffer,
|
|
33
|
+
# instead setting the length of the bitmap buffer to 0.
|
|
34
|
+
def null_count
|
|
35
|
+
field_offset = 8
|
|
36
|
+
@view.unpack_long(field_offset)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
class FixedSizeBinary < ::FlatBuffers::Table
|
|
15
|
+
# Number of bytes per value
|
|
16
|
+
def byte_width
|
|
17
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
18
|
+
return 0 if field_offset.zero?
|
|
19
|
+
|
|
20
|
+
@view.unpack_int(field_offset)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
class FixedSizeList < ::FlatBuffers::Table
|
|
15
|
+
# Number of list items per value
|
|
16
|
+
def list_size
|
|
17
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
18
|
+
return 0 if field_offset.zero?
|
|
19
|
+
|
|
20
|
+
@view.unpack_int(field_offset)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
require_relative "../../../apache/arrow/flatbuf/precision"
|
|
9
|
+
|
|
10
|
+
module ArrowFormat
|
|
11
|
+
module Org
|
|
12
|
+
module Apache
|
|
13
|
+
module Arrow
|
|
14
|
+
module Flatbuf
|
|
15
|
+
class FloatingPoint < ::FlatBuffers::Table
|
|
16
|
+
def precision
|
|
17
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
18
|
+
if field_offset.zero?
|
|
19
|
+
enum_value = 0
|
|
20
|
+
else
|
|
21
|
+
enum_value = @view.unpack_short(field_offset)
|
|
22
|
+
end
|
|
23
|
+
::ArrowFormat::Org::Apache::Arrow::Flatbuf::Precision.try_convert(enum_value) || enum_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //File.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Footer (//File.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
require_relative "../../../apache/arrow/flatbuf/key_value"
|
|
9
|
+
require_relative "../../../apache/arrow/flatbuf/block"
|
|
10
|
+
require_relative "../../../apache/arrow/flatbuf/schema"
|
|
11
|
+
require_relative "../../../apache/arrow/flatbuf/metadata_version"
|
|
12
|
+
|
|
13
|
+
module ArrowFormat
|
|
14
|
+
module Org
|
|
15
|
+
module Apache
|
|
16
|
+
module Arrow
|
|
17
|
+
module Flatbuf
|
|
18
|
+
# ----------------------------------------------------------------------
|
|
19
|
+
# Arrow File metadata
|
|
20
|
+
#
|
|
21
|
+
class Footer < ::FlatBuffers::Table
|
|
22
|
+
# User-defined metadata
|
|
23
|
+
def custom_metadata
|
|
24
|
+
field_offset = @view.unpack_virtual_offset(12)
|
|
25
|
+
return nil if field_offset.zero?
|
|
26
|
+
|
|
27
|
+
element_size = 4
|
|
28
|
+
@view.unpack_vector(field_offset, element_size) do |element_offset|
|
|
29
|
+
@view.unpack_table(::ArrowFormat::Org::Apache::Arrow::Flatbuf::KeyValue, element_offset)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def dictionaries
|
|
34
|
+
field_offset = @view.unpack_virtual_offset(8)
|
|
35
|
+
return nil if field_offset.zero?
|
|
36
|
+
|
|
37
|
+
element_size = 24
|
|
38
|
+
@view.unpack_vector(field_offset, element_size) do |element_offset|
|
|
39
|
+
@view.unpack_struct(::ArrowFormat::Org::Apache::Arrow::Flatbuf::Block, element_offset)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def record_batches
|
|
44
|
+
field_offset = @view.unpack_virtual_offset(10)
|
|
45
|
+
return nil if field_offset.zero?
|
|
46
|
+
|
|
47
|
+
element_size = 24
|
|
48
|
+
@view.unpack_vector(field_offset, element_size) do |element_offset|
|
|
49
|
+
@view.unpack_struct(::ArrowFormat::Org::Apache::Arrow::Flatbuf::Block, element_offset)
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def schema
|
|
54
|
+
field_offset = @view.unpack_virtual_offset(6)
|
|
55
|
+
return nil if field_offset.zero?
|
|
56
|
+
|
|
57
|
+
@view.unpack_table(::ArrowFormat::Org::Apache::Arrow::Flatbuf::Schema, field_offset)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def version
|
|
61
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
62
|
+
if field_offset.zero?
|
|
63
|
+
enum_value = 0
|
|
64
|
+
else
|
|
65
|
+
enum_value = @view.unpack_short(field_offset)
|
|
66
|
+
end
|
|
67
|
+
::ArrowFormat::Org::Apache::Arrow::Flatbuf::MetadataVersion.try_convert(enum_value) || enum_value
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
class Int < ::FlatBuffers::Table
|
|
15
|
+
def bit_width
|
|
16
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
17
|
+
return 0 if field_offset.zero?
|
|
18
|
+
|
|
19
|
+
@view.unpack_int(field_offset)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def signed?
|
|
23
|
+
field_offset = @view.unpack_virtual_offset(6)
|
|
24
|
+
return false if field_offset.zero?
|
|
25
|
+
|
|
26
|
+
@view.unpack_bool(field_offset)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
require_relative "../../../apache/arrow/flatbuf/interval_unit"
|
|
9
|
+
|
|
10
|
+
module ArrowFormat
|
|
11
|
+
module Org
|
|
12
|
+
module Apache
|
|
13
|
+
module Arrow
|
|
14
|
+
module Flatbuf
|
|
15
|
+
class Interval < ::FlatBuffers::Table
|
|
16
|
+
def unit
|
|
17
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
18
|
+
if field_offset.zero?
|
|
19
|
+
enum_value = 0
|
|
20
|
+
else
|
|
21
|
+
enum_value = @view.unpack_short(field_offset)
|
|
22
|
+
end
|
|
23
|
+
::ArrowFormat::Org::Apache::Arrow::Flatbuf::IntervalUnit.try_convert(enum_value) || enum_value
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
class IntervalUnit < ::FlatBuffers::Enum
|
|
15
|
+
YEAR_MONTH = register("YEAR_MONTH", 0)
|
|
16
|
+
DAY_TIME = register("DAY_TIME", 1)
|
|
17
|
+
MONTH_DAY_NANO = register("MONTH_DAY_NANO", 2)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# ----------------------------------------------------------------------
|
|
15
|
+
# user defined key value pairs to add custom metadata to arrow
|
|
16
|
+
# key namespacing is the responsibility of the user
|
|
17
|
+
class KeyValue < ::FlatBuffers::Table
|
|
18
|
+
def key
|
|
19
|
+
field_offset = @view.unpack_virtual_offset(4)
|
|
20
|
+
return nil if field_offset.zero?
|
|
21
|
+
|
|
22
|
+
@view.unpack_string(field_offset)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def value
|
|
26
|
+
field_offset = @view.unpack_virtual_offset(6)
|
|
27
|
+
return nil if field_offset.zero?
|
|
28
|
+
|
|
29
|
+
@view.unpack_string(field_offset)
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# Same as Binary, but with 64-bit offsets, allowing to represent
|
|
15
|
+
# extremely large data values.
|
|
16
|
+
class LargeBinary < ::FlatBuffers::Table
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# Same as List, but with 64-bit offsets, allowing to represent
|
|
15
|
+
# extremely large data values.
|
|
16
|
+
class LargeList < ::FlatBuffers::Table
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# Same as ListView, but with 64-bit offsets and sizes, allowing to represent
|
|
15
|
+
# extremely large data values.
|
|
16
|
+
class LargeListView < ::FlatBuffers::Table
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
# Same as Utf8, but with 64-bit offsets, allowing to represent
|
|
15
|
+
# extremely large data values.
|
|
16
|
+
class LargeUtf8 < ::FlatBuffers::Table
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Automatically generated. Don't modify manually.
|
|
2
|
+
#
|
|
3
|
+
# Red FlatBuffers version: 0.0.3
|
|
4
|
+
# Declared by: //Schema.fbs
|
|
5
|
+
# Rooting type: org.apache.arrow.flatbuf.Message (//Message.fbs)
|
|
6
|
+
|
|
7
|
+
require "flatbuffers"
|
|
8
|
+
|
|
9
|
+
module ArrowFormat
|
|
10
|
+
module Org
|
|
11
|
+
module Apache
|
|
12
|
+
module Arrow
|
|
13
|
+
module Flatbuf
|
|
14
|
+
class List < ::FlatBuffers::Table
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|