forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSchema_generated.h
More file actions
2398 lines (2186 loc) · 81.8 KB
/
Copy pathSchema_generated.h
File metadata and controls
2398 lines (2186 loc) · 81.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// automatically generated by the FlatBuffers compiler, do not modify
#ifndef FLATBUFFERS_GENERATED_SCHEMA_ORG_APACHE_ARROW_FLATBUF_H_
#define FLATBUFFERS_GENERATED_SCHEMA_ORG_APACHE_ARROW_FLATBUF_H_
#include "flatbuffers/flatbuffers.h"
namespace org {
namespace apache {
namespace arrow {
namespace flatbuf {
struct Null;
struct NullBuilder;
struct Struct_;
struct Struct_Builder;
struct List;
struct ListBuilder;
struct LargeList;
struct LargeListBuilder;
struct FixedSizeList;
struct FixedSizeListBuilder;
struct Map;
struct MapBuilder;
struct Union;
struct UnionBuilder;
struct Int;
struct IntBuilder;
struct FloatingPoint;
struct FloatingPointBuilder;
struct Utf8;
struct Utf8Builder;
struct Binary;
struct BinaryBuilder;
struct LargeUtf8;
struct LargeUtf8Builder;
struct LargeBinary;
struct LargeBinaryBuilder;
struct FixedSizeBinary;
struct FixedSizeBinaryBuilder;
struct Bool;
struct BoolBuilder;
struct RunEndEncoded;
struct RunEndEncodedBuilder;
struct Decimal;
struct DecimalBuilder;
struct Date;
struct DateBuilder;
struct Time;
struct TimeBuilder;
struct Timestamp;
struct TimestampBuilder;
struct Interval;
struct IntervalBuilder;
struct Duration;
struct DurationBuilder;
struct KeyValue;
struct KeyValueBuilder;
struct DictionaryEncoding;
struct DictionaryEncodingBuilder;
struct Field;
struct FieldBuilder;
struct Buffer;
struct Schema;
struct SchemaBuilder;
enum class MetadataVersion : int16_t {
/// 0.1.0 (October 2016).
V1 = 0,
/// 0.2.0 (February 2017). Non-backwards compatible with V1.
V2 = 1,
/// 0.3.0 -> 0.7.1 (May - December 2017). Non-backwards compatible with V2.
V3 = 2,
/// >= 0.8.0 (December 2017). Non-backwards compatible with V3.
V4 = 3,
/// >= 1.0.0 (July 2020. Backwards compatible with V4 (V5 readers can read V4
/// metadata and IPC messages). Implementations are recommended to provide a
/// V4 compatibility mode with V5 format changes disabled.
///
/// Incompatible changes between V4 and V5:
/// - Union buffer layout has changed. In V5, Unions don't have a validity
/// bitmap buffer.
V5 = 4,
MIN = V1,
MAX = V5
};
inline const MetadataVersion (&EnumValuesMetadataVersion())[5] {
static const MetadataVersion values[] = {
MetadataVersion::V1,
MetadataVersion::V2,
MetadataVersion::V3,
MetadataVersion::V4,
MetadataVersion::V5
};
return values;
}
inline const char * const *EnumNamesMetadataVersion() {
static const char * const names[6] = {
"V1",
"V2",
"V3",
"V4",
"V5",
nullptr
};
return names;
}
inline const char *EnumNameMetadataVersion(MetadataVersion e) {
if (flatbuffers::IsOutRange(e, MetadataVersion::V1, MetadataVersion::V5)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesMetadataVersion()[index];
}
/// Represents Arrow Features that might not have full support
/// within implementations. This is intended to be used in
/// two scenarios:
/// 1. A mechanism for readers of Arrow Streams
/// and files to understand that the stream or file makes
/// use of a feature that isn't supported or unknown to
/// the implementation (and therefore can meet the Arrow
/// forward compatibility guarantees).
/// 2. A means of negotiating between a client and server
/// what features a stream is allowed to use. The enums
/// values here are intented to represent higher level
/// features, additional details maybe negotiated
/// with key-value pairs specific to the protocol.
///
/// Enums added to this list should be assigned power-of-two values
/// to facilitate exchanging and comparing bitmaps for supported
/// features.
enum class Feature : int64_t {
/// Needed to make flatbuffers happy.
UNUSED = 0,
/// The stream makes use of multiple full dictionaries with the
/// same ID and assumes clients implement dictionary replacement
/// correctly.
DICTIONARY_REPLACEMENT = 1LL,
/// The stream makes use of compressed bodies as described
/// in Message.fbs.
COMPRESSED_BODY = 2LL,
MIN = UNUSED,
MAX = COMPRESSED_BODY
};
inline const Feature (&EnumValuesFeature())[3] {
static const Feature values[] = {
Feature::UNUSED,
Feature::DICTIONARY_REPLACEMENT,
Feature::COMPRESSED_BODY
};
return values;
}
inline const char * const *EnumNamesFeature() {
static const char * const names[4] = {
"UNUSED",
"DICTIONARY_REPLACEMENT",
"COMPRESSED_BODY",
nullptr
};
return names;
}
inline const char *EnumNameFeature(Feature e) {
if (flatbuffers::IsOutRange(e, Feature::UNUSED, Feature::COMPRESSED_BODY)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesFeature()[index];
}
enum class UnionMode : int16_t {
Sparse = 0,
Dense = 1,
MIN = Sparse,
MAX = Dense
};
inline const UnionMode (&EnumValuesUnionMode())[2] {
static const UnionMode values[] = {
UnionMode::Sparse,
UnionMode::Dense
};
return values;
}
inline const char * const *EnumNamesUnionMode() {
static const char * const names[3] = {
"Sparse",
"Dense",
nullptr
};
return names;
}
inline const char *EnumNameUnionMode(UnionMode e) {
if (flatbuffers::IsOutRange(e, UnionMode::Sparse, UnionMode::Dense)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesUnionMode()[index];
}
enum class Precision : int16_t {
HALF = 0,
SINGLE = 1,
DOUBLE = 2,
MIN = HALF,
MAX = DOUBLE
};
inline const Precision (&EnumValuesPrecision())[3] {
static const Precision values[] = {
Precision::HALF,
Precision::SINGLE,
Precision::DOUBLE
};
return values;
}
inline const char * const *EnumNamesPrecision() {
static const char * const names[4] = {
"HALF",
"SINGLE",
"DOUBLE",
nullptr
};
return names;
}
inline const char *EnumNamePrecision(Precision e) {
if (flatbuffers::IsOutRange(e, Precision::HALF, Precision::DOUBLE)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesPrecision()[index];
}
enum class DateUnit : int16_t {
DAY = 0,
MILLISECOND = 1,
MIN = DAY,
MAX = MILLISECOND
};
inline const DateUnit (&EnumValuesDateUnit())[2] {
static const DateUnit values[] = {
DateUnit::DAY,
DateUnit::MILLISECOND
};
return values;
}
inline const char * const *EnumNamesDateUnit() {
static const char * const names[3] = {
"DAY",
"MILLISECOND",
nullptr
};
return names;
}
inline const char *EnumNameDateUnit(DateUnit e) {
if (flatbuffers::IsOutRange(e, DateUnit::DAY, DateUnit::MILLISECOND)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesDateUnit()[index];
}
enum class TimeUnit : int16_t {
SECOND = 0,
MILLISECOND = 1,
MICROSECOND = 2,
NANOSECOND = 3,
MIN = SECOND,
MAX = NANOSECOND
};
inline const TimeUnit (&EnumValuesTimeUnit())[4] {
static const TimeUnit values[] = {
TimeUnit::SECOND,
TimeUnit::MILLISECOND,
TimeUnit::MICROSECOND,
TimeUnit::NANOSECOND
};
return values;
}
inline const char * const *EnumNamesTimeUnit() {
static const char * const names[5] = {
"SECOND",
"MILLISECOND",
"MICROSECOND",
"NANOSECOND",
nullptr
};
return names;
}
inline const char *EnumNameTimeUnit(TimeUnit e) {
if (flatbuffers::IsOutRange(e, TimeUnit::SECOND, TimeUnit::NANOSECOND)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesTimeUnit()[index];
}
enum class IntervalUnit : int16_t {
YEAR_MONTH = 0,
DAY_TIME = 1,
MONTH_DAY_NANO = 2,
MIN = YEAR_MONTH,
MAX = MONTH_DAY_NANO
};
inline const IntervalUnit (&EnumValuesIntervalUnit())[3] {
static const IntervalUnit values[] = {
IntervalUnit::YEAR_MONTH,
IntervalUnit::DAY_TIME,
IntervalUnit::MONTH_DAY_NANO
};
return values;
}
inline const char * const *EnumNamesIntervalUnit() {
static const char * const names[4] = {
"YEAR_MONTH",
"DAY_TIME",
"MONTH_DAY_NANO",
nullptr
};
return names;
}
inline const char *EnumNameIntervalUnit(IntervalUnit e) {
if (flatbuffers::IsOutRange(e, IntervalUnit::YEAR_MONTH, IntervalUnit::MONTH_DAY_NANO)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesIntervalUnit()[index];
}
/// ----------------------------------------------------------------------
/// Top-level Type value, enabling extensible type-specific metadata. We can
/// add new logical types to Type without breaking backwards compatibility
enum class Type : uint8_t {
NONE = 0,
Null = 1,
Int = 2,
FloatingPoint = 3,
Binary = 4,
Utf8 = 5,
Bool = 6,
Decimal = 7,
Date = 8,
Time = 9,
Timestamp = 10,
Interval = 11,
List = 12,
Struct_ = 13,
Union = 14,
FixedSizeBinary = 15,
FixedSizeList = 16,
Map = 17,
Duration = 18,
LargeBinary = 19,
LargeUtf8 = 20,
LargeList = 21,
RunEndEncoded = 22,
MIN = NONE,
MAX = RunEndEncoded
};
inline const Type (&EnumValuesType())[23] {
static const Type values[] = {
Type::NONE,
Type::Null,
Type::Int,
Type::FloatingPoint,
Type::Binary,
Type::Utf8,
Type::Bool,
Type::Decimal,
Type::Date,
Type::Time,
Type::Timestamp,
Type::Interval,
Type::List,
Type::Struct_,
Type::Union,
Type::FixedSizeBinary,
Type::FixedSizeList,
Type::Map,
Type::Duration,
Type::LargeBinary,
Type::LargeUtf8,
Type::LargeList,
Type::RunEndEncoded
};
return values;
}
inline const char * const *EnumNamesType() {
static const char * const names[24] = {
"NONE",
"Null",
"Int",
"FloatingPoint",
"Binary",
"Utf8",
"Bool",
"Decimal",
"Date",
"Time",
"Timestamp",
"Interval",
"List",
"Struct_",
"Union",
"FixedSizeBinary",
"FixedSizeList",
"Map",
"Duration",
"LargeBinary",
"LargeUtf8",
"LargeList",
"RunEndEncoded",
nullptr
};
return names;
}
inline const char *EnumNameType(Type e) {
if (flatbuffers::IsOutRange(e, Type::NONE, Type::RunEndEncoded)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesType()[index];
}
template<typename T> struct TypeTraits {
static const Type enum_value = Type::NONE;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Null> {
static const Type enum_value = Type::Null;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Int> {
static const Type enum_value = Type::Int;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::FloatingPoint> {
static const Type enum_value = Type::FloatingPoint;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Binary> {
static const Type enum_value = Type::Binary;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Utf8> {
static const Type enum_value = Type::Utf8;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Bool> {
static const Type enum_value = Type::Bool;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Decimal> {
static const Type enum_value = Type::Decimal;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Date> {
static const Type enum_value = Type::Date;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Time> {
static const Type enum_value = Type::Time;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Timestamp> {
static const Type enum_value = Type::Timestamp;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Interval> {
static const Type enum_value = Type::Interval;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::List> {
static const Type enum_value = Type::List;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Struct_> {
static const Type enum_value = Type::Struct_;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Union> {
static const Type enum_value = Type::Union;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::FixedSizeBinary> {
static const Type enum_value = Type::FixedSizeBinary;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::FixedSizeList> {
static const Type enum_value = Type::FixedSizeList;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Map> {
static const Type enum_value = Type::Map;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::Duration> {
static const Type enum_value = Type::Duration;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::LargeBinary> {
static const Type enum_value = Type::LargeBinary;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::LargeUtf8> {
static const Type enum_value = Type::LargeUtf8;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::LargeList> {
static const Type enum_value = Type::LargeList;
};
template<> struct TypeTraits<org::apache::arrow::flatbuf::RunEndEncoded> {
static const Type enum_value = Type::RunEndEncoded;
};
bool VerifyType(flatbuffers::Verifier &verifier, const void *obj, Type type);
bool VerifyTypeVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector<flatbuffers::Offset<void>> *values, const flatbuffers::Vector<uint8_t> *types);
/// ----------------------------------------------------------------------
/// Dictionary encoding metadata
/// Maintained for forwards compatibility, in the future
/// Dictionaries might be explicit maps between integers and values
/// allowing for non-contiguous index values
enum class DictionaryKind : int16_t {
DenseArray = 0,
MIN = DenseArray,
MAX = DenseArray
};
inline const DictionaryKind (&EnumValuesDictionaryKind())[1] {
static const DictionaryKind values[] = {
DictionaryKind::DenseArray
};
return values;
}
inline const char * const *EnumNamesDictionaryKind() {
static const char * const names[2] = {
"DenseArray",
nullptr
};
return names;
}
inline const char *EnumNameDictionaryKind(DictionaryKind e) {
if (flatbuffers::IsOutRange(e, DictionaryKind::DenseArray, DictionaryKind::DenseArray)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesDictionaryKind()[index];
}
/// ----------------------------------------------------------------------
/// Endianness of the platform producing the data
enum class Endianness : int16_t {
Little = 0,
Big = 1,
MIN = Little,
MAX = Big
};
inline const Endianness (&EnumValuesEndianness())[2] {
static const Endianness values[] = {
Endianness::Little,
Endianness::Big
};
return values;
}
inline const char * const *EnumNamesEndianness() {
static const char * const names[3] = {
"Little",
"Big",
nullptr
};
return names;
}
inline const char *EnumNameEndianness(Endianness e) {
if (flatbuffers::IsOutRange(e, Endianness::Little, Endianness::Big)) return "";
const size_t index = static_cast<size_t>(e);
return EnumNamesEndianness()[index];
}
/// ----------------------------------------------------------------------
/// A Buffer represents a single contiguous memory segment
FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) Buffer FLATBUFFERS_FINAL_CLASS {
private:
int64_t offset_;
int64_t length_;
public:
Buffer()
: offset_(0),
length_(0) {
}
Buffer(int64_t _offset, int64_t _length)
: offset_(flatbuffers::EndianScalar(_offset)),
length_(flatbuffers::EndianScalar(_length)) {
}
/// The relative offset into the shared memory page where the bytes for this
/// buffer starts
int64_t offset() const {
return flatbuffers::EndianScalar(offset_);
}
/// The absolute length (in bytes) of the memory buffer. The memory is found
/// from offset (inclusive) to offset + length (non-inclusive). When building
/// messages using the encapsulated IPC message, padding bytes may be written
/// after a buffer, but such padding bytes do not need to be accounted for in
/// the size here.
int64_t length() const {
return flatbuffers::EndianScalar(length_);
}
};
FLATBUFFERS_STRUCT_END(Buffer, 16);
/// These are stored in the flatbuffer in the Type union below
struct Null FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef NullBuilder Builder;
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
verifier.EndTable();
}
};
struct NullBuilder {
typedef Null Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
explicit NullBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Null> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Null>(end);
return o;
}
};
inline flatbuffers::Offset<Null> CreateNull(
flatbuffers::FlatBufferBuilder &_fbb) {
NullBuilder builder_(_fbb);
return builder_.Finish();
}
/// A Struct_ in the flatbuffer metadata is the same as an Arrow Struct
/// (according to the physical memory layout). We used Struct_ here as
/// Struct is a reserved word in Flatbuffers
struct Struct_ FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef Struct_Builder Builder;
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
verifier.EndTable();
}
};
struct Struct_Builder {
typedef Struct_ Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
explicit Struct_Builder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Struct_> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Struct_>(end);
return o;
}
};
inline flatbuffers::Offset<Struct_> CreateStruct_(
flatbuffers::FlatBufferBuilder &_fbb) {
Struct_Builder builder_(_fbb);
return builder_.Finish();
}
struct List FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef ListBuilder Builder;
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
verifier.EndTable();
}
};
struct ListBuilder {
typedef List Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
explicit ListBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<List> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<List>(end);
return o;
}
};
inline flatbuffers::Offset<List> CreateList(
flatbuffers::FlatBufferBuilder &_fbb) {
ListBuilder builder_(_fbb);
return builder_.Finish();
}
/// Same as List, but with 64-bit offsets, allowing to represent
/// extremely large data values.
struct LargeList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef LargeListBuilder Builder;
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
verifier.EndTable();
}
};
struct LargeListBuilder {
typedef LargeList Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
explicit LargeListBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<LargeList> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<LargeList>(end);
return o;
}
};
inline flatbuffers::Offset<LargeList> CreateLargeList(
flatbuffers::FlatBufferBuilder &_fbb) {
LargeListBuilder builder_(_fbb);
return builder_.Finish();
}
struct FixedSizeList FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef FixedSizeListBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_LISTSIZE = 4
};
/// Number of list items per value
int32_t listSize() const {
return GetField<int32_t>(VT_LISTSIZE, 0);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<int32_t>(verifier, VT_LISTSIZE) &&
verifier.EndTable();
}
};
struct FixedSizeListBuilder {
typedef FixedSizeList Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_listSize(int32_t listSize) {
fbb_.AddElement<int32_t>(FixedSizeList::VT_LISTSIZE, listSize, 0);
}
explicit FixedSizeListBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<FixedSizeList> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<FixedSizeList>(end);
return o;
}
};
inline flatbuffers::Offset<FixedSizeList> CreateFixedSizeList(
flatbuffers::FlatBufferBuilder &_fbb,
int32_t listSize = 0) {
FixedSizeListBuilder builder_(_fbb);
builder_.add_listSize(listSize);
return builder_.Finish();
}
/// A Map is a logical nested type that is represented as
///
/// List<entries: Struct<key: K, value: V>>
///
/// In this layout, the keys and values are each respectively contiguous. We do
/// not constrain the key and value types, so the application is responsible
/// for ensuring that the keys are hashable and unique. Whether the keys are sorted
/// may be set in the metadata for this field.
///
/// In a field with Map type, the field has a child Struct field, which then
/// has two children: key type and the second the value type. The names of the
/// child fields may be respectively "entries", "key", and "value", but this is
/// not enforced.
///
/// Map
/// ```text
/// - child[0] entries: Struct
/// - child[0] key: K
/// - child[1] value: V
/// ```
/// Neither the "entries" field nor the "key" field may be nullable.
///
/// The metadata is structured so that Arrow systems without special handling
/// for Map can make Map an alias for List. The "layout" attribute for the Map
/// field must have the same contents as a List.
struct Map FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef MapBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_KEYSSORTED = 4
};
/// Set to true if the keys within each value are sorted
bool keysSorted() const {
return GetField<uint8_t>(VT_KEYSSORTED, 0) != 0;
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<uint8_t>(verifier, VT_KEYSSORTED) &&
verifier.EndTable();
}
};
struct MapBuilder {
typedef Map Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_keysSorted(bool keysSorted) {
fbb_.AddElement<uint8_t>(Map::VT_KEYSSORTED, static_cast<uint8_t>(keysSorted), 0);
}
explicit MapBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Map> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Map>(end);
return o;
}
};
inline flatbuffers::Offset<Map> CreateMap(
flatbuffers::FlatBufferBuilder &_fbb,
bool keysSorted = false) {
MapBuilder builder_(_fbb);
builder_.add_keysSorted(keysSorted);
return builder_.Finish();
}
/// A union is a complex type with children in Field
/// By default ids in the type vector refer to the offsets in the children
/// optionally typeIds provides an indirection between the child offset and the type id
/// for each child `typeIds[offset]` is the id used in the type vector
struct Union FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef UnionBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_MODE = 4,
VT_TYPEIDS = 6
};
org::apache::arrow::flatbuf::UnionMode mode() const {
return static_cast<org::apache::arrow::flatbuf::UnionMode>(GetField<int16_t>(VT_MODE, 0));
}
const flatbuffers::Vector<int32_t> *typeIds() const {
return GetPointer<const flatbuffers::Vector<int32_t> *>(VT_TYPEIDS);
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<int16_t>(verifier, VT_MODE) &&
VerifyOffset(verifier, VT_TYPEIDS) &&
verifier.VerifyVector(typeIds()) &&
verifier.EndTable();
}
};
struct UnionBuilder {
typedef Union Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_mode(org::apache::arrow::flatbuf::UnionMode mode) {
fbb_.AddElement<int16_t>(Union::VT_MODE, static_cast<int16_t>(mode), 0);
}
void add_typeIds(flatbuffers::Offset<flatbuffers::Vector<int32_t>> typeIds) {
fbb_.AddOffset(Union::VT_TYPEIDS, typeIds);
}
explicit UnionBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Union> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Union>(end);
return o;
}
};
inline flatbuffers::Offset<Union> CreateUnion(
flatbuffers::FlatBufferBuilder &_fbb,
org::apache::arrow::flatbuf::UnionMode mode = org::apache::arrow::flatbuf::UnionMode::Sparse,
flatbuffers::Offset<flatbuffers::Vector<int32_t>> typeIds = 0) {
UnionBuilder builder_(_fbb);
builder_.add_typeIds(typeIds);
builder_.add_mode(mode);
return builder_.Finish();
}
inline flatbuffers::Offset<Union> CreateUnionDirect(
flatbuffers::FlatBufferBuilder &_fbb,
org::apache::arrow::flatbuf::UnionMode mode = org::apache::arrow::flatbuf::UnionMode::Sparse,
const std::vector<int32_t> *typeIds = nullptr) {
auto typeIds__ = typeIds ? _fbb.CreateVector<int32_t>(*typeIds) : 0;
return org::apache::arrow::flatbuf::CreateUnion(
_fbb,
mode,
typeIds__);
}
struct Int FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef IntBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {
VT_BITWIDTH = 4,
VT_IS_SIGNED = 6
};
int32_t bitWidth() const {
return GetField<int32_t>(VT_BITWIDTH, 0);
}
bool is_signed() const {
return GetField<uint8_t>(VT_IS_SIGNED, 0) != 0;
}
bool Verify(flatbuffers::Verifier &verifier) const {
return VerifyTableStart(verifier) &&
VerifyField<int32_t>(verifier, VT_BITWIDTH) &&
VerifyField<uint8_t>(verifier, VT_IS_SIGNED) &&
verifier.EndTable();
}
};
struct IntBuilder {
typedef Int Table;
flatbuffers::FlatBufferBuilder &fbb_;
flatbuffers::uoffset_t start_;
void add_bitWidth(int32_t bitWidth) {
fbb_.AddElement<int32_t>(Int::VT_BITWIDTH, bitWidth, 0);
}
void add_is_signed(bool is_signed) {
fbb_.AddElement<uint8_t>(Int::VT_IS_SIGNED, static_cast<uint8_t>(is_signed), 0);
}
explicit IntBuilder(flatbuffers::FlatBufferBuilder &_fbb)
: fbb_(_fbb) {
start_ = fbb_.StartTable();
}
flatbuffers::Offset<Int> Finish() {
const auto end = fbb_.EndTable(start_);
auto o = flatbuffers::Offset<Int>(end);
return o;
}
};
inline flatbuffers::Offset<Int> CreateInt(
flatbuffers::FlatBufferBuilder &_fbb,
int32_t bitWidth = 0,
bool is_signed = false) {
IntBuilder builder_(_fbb);
builder_.add_bitWidth(bitWidth);
builder_.add_is_signed(is_signed);
return builder_.Finish();
}
struct FloatingPoint FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
typedef FloatingPointBuilder Builder;
enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE {