1/**
2 * Autogenerated by Thrift Compiler (0.11.0)
3 *
4 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5 * @generated
6 */
7#include "parquet_types.h"
8
9#include <algorithm>
10#include <ostream>
11
12#include <thrift/TToString.h>
13
14namespace parquet { namespace format {
15
16int _kTypeValues[] = {
17 Type::BOOLEAN,
18 Type::INT32,
19 Type::INT64,
20 Type::INT96,
21 Type::FLOAT,
22 Type::DOUBLE,
23 Type::BYTE_ARRAY,
24 Type::FIXED_LEN_BYTE_ARRAY
25};
26const char* _kTypeNames[] = {
27 "BOOLEAN",
28 "INT32",
29 "INT64",
30 "INT96",
31 "FLOAT",
32 "DOUBLE",
33 "BYTE_ARRAY",
34 "FIXED_LEN_BYTE_ARRAY"
35};
36const std::map<int, const char*> _Type_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kTypeValues, _kTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
37
38std::ostream& operator<<(std::ostream& out, const Type::type& val) {
39 std::map<int, const char*>::const_iterator it = _Type_VALUES_TO_NAMES.find(val);
40 if (it != _Type_VALUES_TO_NAMES.end()) {
41 out << it->second;
42 } else {
43 out << static_cast<int>(val);
44 }
45 return out;
46}
47
48int _kConvertedTypeValues[] = {
49 ConvertedType::UTF8,
50 ConvertedType::MAP,
51 ConvertedType::MAP_KEY_VALUE,
52 ConvertedType::LIST,
53 ConvertedType::ENUM,
54 ConvertedType::DECIMAL,
55 ConvertedType::DATE,
56 ConvertedType::TIME_MILLIS,
57 ConvertedType::TIME_MICROS,
58 ConvertedType::TIMESTAMP_MILLIS,
59 ConvertedType::TIMESTAMP_MICROS,
60 ConvertedType::UINT_8,
61 ConvertedType::UINT_16,
62 ConvertedType::UINT_32,
63 ConvertedType::UINT_64,
64 ConvertedType::INT_8,
65 ConvertedType::INT_16,
66 ConvertedType::INT_32,
67 ConvertedType::INT_64,
68 ConvertedType::JSON,
69 ConvertedType::BSON,
70 ConvertedType::INTERVAL
71};
72const char* _kConvertedTypeNames[] = {
73 "UTF8",
74 "MAP",
75 "MAP_KEY_VALUE",
76 "LIST",
77 "ENUM",
78 "DECIMAL",
79 "DATE",
80 "TIME_MILLIS",
81 "TIME_MICROS",
82 "TIMESTAMP_MILLIS",
83 "TIMESTAMP_MICROS",
84 "UINT_8",
85 "UINT_16",
86 "UINT_32",
87 "UINT_64",
88 "INT_8",
89 "INT_16",
90 "INT_32",
91 "INT_64",
92 "JSON",
93 "BSON",
94 "INTERVAL"
95};
96const std::map<int, const char*> _ConvertedType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(22, _kConvertedTypeValues, _kConvertedTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
97
98std::ostream& operator<<(std::ostream& out, const ConvertedType::type& val) {
99 std::map<int, const char*>::const_iterator it = _ConvertedType_VALUES_TO_NAMES.find(val);
100 if (it != _ConvertedType_VALUES_TO_NAMES.end()) {
101 out << it->second;
102 } else {
103 out << static_cast<int>(val);
104 }
105 return out;
106}
107
108int _kFieldRepetitionTypeValues[] = {
109 FieldRepetitionType::REQUIRED,
110 FieldRepetitionType::OPTIONAL,
111 FieldRepetitionType::REPEATED
112};
113const char* _kFieldRepetitionTypeNames[] = {
114 "REQUIRED",
115 "OPTIONAL",
116 "REPEATED"
117};
118const std::map<int, const char*> _FieldRepetitionType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kFieldRepetitionTypeValues, _kFieldRepetitionTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
119
120std::ostream& operator<<(std::ostream& out, const FieldRepetitionType::type& val) {
121 std::map<int, const char*>::const_iterator it = _FieldRepetitionType_VALUES_TO_NAMES.find(val);
122 if (it != _FieldRepetitionType_VALUES_TO_NAMES.end()) {
123 out << it->second;
124 } else {
125 out << static_cast<int>(val);
126 }
127 return out;
128}
129
130int _kEncodingValues[] = {
131 Encoding::PLAIN,
132 Encoding::PLAIN_DICTIONARY,
133 Encoding::RLE,
134 Encoding::BIT_PACKED,
135 Encoding::DELTA_BINARY_PACKED,
136 Encoding::DELTA_LENGTH_BYTE_ARRAY,
137 Encoding::DELTA_BYTE_ARRAY,
138 Encoding::RLE_DICTIONARY
139};
140const char* _kEncodingNames[] = {
141 "PLAIN",
142 "PLAIN_DICTIONARY",
143 "RLE",
144 "BIT_PACKED",
145 "DELTA_BINARY_PACKED",
146 "DELTA_LENGTH_BYTE_ARRAY",
147 "DELTA_BYTE_ARRAY",
148 "RLE_DICTIONARY"
149};
150const std::map<int, const char*> _Encoding_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(8, _kEncodingValues, _kEncodingNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
151
152std::ostream& operator<<(std::ostream& out, const Encoding::type& val) {
153 std::map<int, const char*>::const_iterator it = _Encoding_VALUES_TO_NAMES.find(val);
154 if (it != _Encoding_VALUES_TO_NAMES.end()) {
155 out << it->second;
156 } else {
157 out << static_cast<int>(val);
158 }
159 return out;
160}
161
162int _kCompressionCodecValues[] = {
163 CompressionCodec::UNCOMPRESSED,
164 CompressionCodec::SNAPPY,
165 CompressionCodec::GZIP,
166 CompressionCodec::LZO,
167 CompressionCodec::BROTLI,
168 CompressionCodec::LZ4,
169 CompressionCodec::ZSTD
170};
171const char* _kCompressionCodecNames[] = {
172 "UNCOMPRESSED",
173 "SNAPPY",
174 "GZIP",
175 "LZO",
176 "BROTLI",
177 "LZ4",
178 "ZSTD"
179};
180const std::map<int, const char*> _CompressionCodec_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(7, _kCompressionCodecValues, _kCompressionCodecNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
181
182std::ostream& operator<<(std::ostream& out, const CompressionCodec::type& val) {
183 std::map<int, const char*>::const_iterator it = _CompressionCodec_VALUES_TO_NAMES.find(val);
184 if (it != _CompressionCodec_VALUES_TO_NAMES.end()) {
185 out << it->second;
186 } else {
187 out << static_cast<int>(val);
188 }
189 return out;
190}
191
192int _kPageTypeValues[] = {
193 PageType::DATA_PAGE,
194 PageType::INDEX_PAGE,
195 PageType::DICTIONARY_PAGE,
196 PageType::DATA_PAGE_V2
197};
198const char* _kPageTypeNames[] = {
199 "DATA_PAGE",
200 "INDEX_PAGE",
201 "DICTIONARY_PAGE",
202 "DATA_PAGE_V2"
203};
204const std::map<int, const char*> _PageType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kPageTypeValues, _kPageTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
205
206std::ostream& operator<<(std::ostream& out, const PageType::type& val) {
207 std::map<int, const char*>::const_iterator it = _PageType_VALUES_TO_NAMES.find(val);
208 if (it != _PageType_VALUES_TO_NAMES.end()) {
209 out << it->second;
210 } else {
211 out << static_cast<int>(val);
212 }
213 return out;
214}
215
216int _kBoundaryOrderValues[] = {
217 BoundaryOrder::UNORDERED,
218 BoundaryOrder::ASCENDING,
219 BoundaryOrder::DESCENDING
220};
221const char* _kBoundaryOrderNames[] = {
222 "UNORDERED",
223 "ASCENDING",
224 "DESCENDING"
225};
226const std::map<int, const char*> _BoundaryOrder_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(3, _kBoundaryOrderValues, _kBoundaryOrderNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL));
227
228std::ostream& operator<<(std::ostream& out, const BoundaryOrder::type& val) {
229 std::map<int, const char*>::const_iterator it = _BoundaryOrder_VALUES_TO_NAMES.find(val);
230 if (it != _BoundaryOrder_VALUES_TO_NAMES.end()) {
231 out << it->second;
232 } else {
233 out << static_cast<int>(val);
234 }
235 return out;
236}
237
238
239Statistics::~Statistics() throw() {
240}
241
242
243void Statistics::__set_max(const std::string& val) {
244 this->max = val;
245__isset.max = true;
246}
247
248void Statistics::__set_min(const std::string& val) {
249 this->min = val;
250__isset.min = true;
251}
252
253void Statistics::__set_null_count(const int64_t val) {
254 this->null_count = val;
255__isset.null_count = true;
256}
257
258void Statistics::__set_distinct_count(const int64_t val) {
259 this->distinct_count = val;
260__isset.distinct_count = true;
261}
262
263void Statistics::__set_max_value(const std::string& val) {
264 this->max_value = val;
265__isset.max_value = true;
266}
267
268void Statistics::__set_min_value(const std::string& val) {
269 this->min_value = val;
270__isset.min_value = true;
271}
272std::ostream& operator<<(std::ostream& out, const Statistics& obj)
273{
274 obj.printTo(out);
275 return out;
276}
277
278
279uint32_t Statistics::read(::apache::thrift::protocol::TProtocol* iprot) {
280
281 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
282 uint32_t xfer = 0;
283 std::string fname;
284 ::apache::thrift::protocol::TType ftype;
285 int16_t fid;
286
287 xfer += iprot->readStructBegin(fname);
288
289 using ::apache::thrift::protocol::TProtocolException;
290
291
292 while (true)
293 {
294 xfer += iprot->readFieldBegin(fname, ftype, fid);
295 if (ftype == ::apache::thrift::protocol::T_STOP) {
296 break;
297 }
298 switch (fid)
299 {
300 case 1:
301 if (ftype == ::apache::thrift::protocol::T_STRING) {
302 xfer += iprot->readBinary(this->max);
303 this->__isset.max = true;
304 } else {
305 xfer += iprot->skip(ftype);
306 }
307 break;
308 case 2:
309 if (ftype == ::apache::thrift::protocol::T_STRING) {
310 xfer += iprot->readBinary(this->min);
311 this->__isset.min = true;
312 } else {
313 xfer += iprot->skip(ftype);
314 }
315 break;
316 case 3:
317 if (ftype == ::apache::thrift::protocol::T_I64) {
318 xfer += iprot->readI64(this->null_count);
319 this->__isset.null_count = true;
320 } else {
321 xfer += iprot->skip(ftype);
322 }
323 break;
324 case 4:
325 if (ftype == ::apache::thrift::protocol::T_I64) {
326 xfer += iprot->readI64(this->distinct_count);
327 this->__isset.distinct_count = true;
328 } else {
329 xfer += iprot->skip(ftype);
330 }
331 break;
332 case 5:
333 if (ftype == ::apache::thrift::protocol::T_STRING) {
334 xfer += iprot->readBinary(this->max_value);
335 this->__isset.max_value = true;
336 } else {
337 xfer += iprot->skip(ftype);
338 }
339 break;
340 case 6:
341 if (ftype == ::apache::thrift::protocol::T_STRING) {
342 xfer += iprot->readBinary(this->min_value);
343 this->__isset.min_value = true;
344 } else {
345 xfer += iprot->skip(ftype);
346 }
347 break;
348 default:
349 xfer += iprot->skip(ftype);
350 break;
351 }
352 xfer += iprot->readFieldEnd();
353 }
354
355 xfer += iprot->readStructEnd();
356
357 return xfer;
358}
359
360uint32_t Statistics::write(::apache::thrift::protocol::TProtocol* oprot) const {
361 uint32_t xfer = 0;
362 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
363 xfer += oprot->writeStructBegin("Statistics");
364
365 if (this->__isset.max) {
366 xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_STRING, 1);
367 xfer += oprot->writeBinary(this->max);
368 xfer += oprot->writeFieldEnd();
369 }
370 if (this->__isset.min) {
371 xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_STRING, 2);
372 xfer += oprot->writeBinary(this->min);
373 xfer += oprot->writeFieldEnd();
374 }
375 if (this->__isset.null_count) {
376 xfer += oprot->writeFieldBegin("null_count", ::apache::thrift::protocol::T_I64, 3);
377 xfer += oprot->writeI64(this->null_count);
378 xfer += oprot->writeFieldEnd();
379 }
380 if (this->__isset.distinct_count) {
381 xfer += oprot->writeFieldBegin("distinct_count", ::apache::thrift::protocol::T_I64, 4);
382 xfer += oprot->writeI64(this->distinct_count);
383 xfer += oprot->writeFieldEnd();
384 }
385 if (this->__isset.max_value) {
386 xfer += oprot->writeFieldBegin("max_value", ::apache::thrift::protocol::T_STRING, 5);
387 xfer += oprot->writeBinary(this->max_value);
388 xfer += oprot->writeFieldEnd();
389 }
390 if (this->__isset.min_value) {
391 xfer += oprot->writeFieldBegin("min_value", ::apache::thrift::protocol::T_STRING, 6);
392 xfer += oprot->writeBinary(this->min_value);
393 xfer += oprot->writeFieldEnd();
394 }
395 xfer += oprot->writeFieldStop();
396 xfer += oprot->writeStructEnd();
397 return xfer;
398}
399
400void swap(Statistics &a, Statistics &b) {
401 using ::std::swap;
402 swap(a.max, b.max);
403 swap(a.min, b.min);
404 swap(a.null_count, b.null_count);
405 swap(a.distinct_count, b.distinct_count);
406 swap(a.max_value, b.max_value);
407 swap(a.min_value, b.min_value);
408 swap(a.__isset, b.__isset);
409}
410
411Statistics::Statistics(const Statistics& other0) {
412 max = other0.max;
413 min = other0.min;
414 null_count = other0.null_count;
415 distinct_count = other0.distinct_count;
416 max_value = other0.max_value;
417 min_value = other0.min_value;
418 __isset = other0.__isset;
419}
420Statistics& Statistics::operator=(const Statistics& other1) {
421 max = other1.max;
422 min = other1.min;
423 null_count = other1.null_count;
424 distinct_count = other1.distinct_count;
425 max_value = other1.max_value;
426 min_value = other1.min_value;
427 __isset = other1.__isset;
428 return *this;
429}
430void Statistics::printTo(std::ostream& out) const {
431 using ::apache::thrift::to_string;
432 out << "Statistics(";
433 out << "max="; (__isset.max ? (out << to_string(max)) : (out << "<null>"));
434 out << ", " << "min="; (__isset.min ? (out << to_string(min)) : (out << "<null>"));
435 out << ", " << "null_count="; (__isset.null_count ? (out << to_string(null_count)) : (out << "<null>"));
436 out << ", " << "distinct_count="; (__isset.distinct_count ? (out << to_string(distinct_count)) : (out << "<null>"));
437 out << ", " << "max_value="; (__isset.max_value ? (out << to_string(max_value)) : (out << "<null>"));
438 out << ", " << "min_value="; (__isset.min_value ? (out << to_string(min_value)) : (out << "<null>"));
439 out << ")";
440}
441
442
443StringType::~StringType() throw() {
444}
445
446std::ostream& operator<<(std::ostream& out, const StringType& obj)
447{
448 obj.printTo(out);
449 return out;
450}
451
452
453uint32_t StringType::read(::apache::thrift::protocol::TProtocol* iprot) {
454
455 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
456 uint32_t xfer = 0;
457 std::string fname;
458 ::apache::thrift::protocol::TType ftype;
459 int16_t fid;
460
461 xfer += iprot->readStructBegin(fname);
462
463 using ::apache::thrift::protocol::TProtocolException;
464
465
466 while (true)
467 {
468 xfer += iprot->readFieldBegin(fname, ftype, fid);
469 if (ftype == ::apache::thrift::protocol::T_STOP) {
470 break;
471 }
472 xfer += iprot->skip(ftype);
473 xfer += iprot->readFieldEnd();
474 }
475
476 xfer += iprot->readStructEnd();
477
478 return xfer;
479}
480
481uint32_t StringType::write(::apache::thrift::protocol::TProtocol* oprot) const {
482 uint32_t xfer = 0;
483 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
484 xfer += oprot->writeStructBegin("StringType");
485
486 xfer += oprot->writeFieldStop();
487 xfer += oprot->writeStructEnd();
488 return xfer;
489}
490
491void swap(StringType &a, StringType &b) {
492 using ::std::swap;
493 (void) a;
494 (void) b;
495}
496
497StringType::StringType(const StringType& other2) {
498 (void) other2;
499}
500StringType& StringType::operator=(const StringType& other3) {
501 (void) other3;
502 return *this;
503}
504void StringType::printTo(std::ostream& out) const {
505 using ::apache::thrift::to_string;
506 out << "StringType(";
507 out << ")";
508}
509
510
511UUIDType::~UUIDType() throw() {
512}
513
514std::ostream& operator<<(std::ostream& out, const UUIDType& obj)
515{
516 obj.printTo(out);
517 return out;
518}
519
520
521uint32_t UUIDType::read(::apache::thrift::protocol::TProtocol* iprot) {
522
523 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
524 uint32_t xfer = 0;
525 std::string fname;
526 ::apache::thrift::protocol::TType ftype;
527 int16_t fid;
528
529 xfer += iprot->readStructBegin(fname);
530
531 using ::apache::thrift::protocol::TProtocolException;
532
533
534 while (true)
535 {
536 xfer += iprot->readFieldBegin(fname, ftype, fid);
537 if (ftype == ::apache::thrift::protocol::T_STOP) {
538 break;
539 }
540 xfer += iprot->skip(ftype);
541 xfer += iprot->readFieldEnd();
542 }
543
544 xfer += iprot->readStructEnd();
545
546 return xfer;
547}
548
549uint32_t UUIDType::write(::apache::thrift::protocol::TProtocol* oprot) const {
550 uint32_t xfer = 0;
551 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
552 xfer += oprot->writeStructBegin("UUIDType");
553
554 xfer += oprot->writeFieldStop();
555 xfer += oprot->writeStructEnd();
556 return xfer;
557}
558
559void swap(UUIDType &a, UUIDType &b) {
560 using ::std::swap;
561 (void) a;
562 (void) b;
563}
564
565UUIDType::UUIDType(const UUIDType& other4) {
566 (void) other4;
567}
568UUIDType& UUIDType::operator=(const UUIDType& other5) {
569 (void) other5;
570 return *this;
571}
572void UUIDType::printTo(std::ostream& out) const {
573 using ::apache::thrift::to_string;
574 out << "UUIDType(";
575 out << ")";
576}
577
578
579MapType::~MapType() throw() {
580}
581
582std::ostream& operator<<(std::ostream& out, const MapType& obj)
583{
584 obj.printTo(out);
585 return out;
586}
587
588
589uint32_t MapType::read(::apache::thrift::protocol::TProtocol* iprot) {
590
591 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
592 uint32_t xfer = 0;
593 std::string fname;
594 ::apache::thrift::protocol::TType ftype;
595 int16_t fid;
596
597 xfer += iprot->readStructBegin(fname);
598
599 using ::apache::thrift::protocol::TProtocolException;
600
601
602 while (true)
603 {
604 xfer += iprot->readFieldBegin(fname, ftype, fid);
605 if (ftype == ::apache::thrift::protocol::T_STOP) {
606 break;
607 }
608 xfer += iprot->skip(ftype);
609 xfer += iprot->readFieldEnd();
610 }
611
612 xfer += iprot->readStructEnd();
613
614 return xfer;
615}
616
617uint32_t MapType::write(::apache::thrift::protocol::TProtocol* oprot) const {
618 uint32_t xfer = 0;
619 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
620 xfer += oprot->writeStructBegin("MapType");
621
622 xfer += oprot->writeFieldStop();
623 xfer += oprot->writeStructEnd();
624 return xfer;
625}
626
627void swap(MapType &a, MapType &b) {
628 using ::std::swap;
629 (void) a;
630 (void) b;
631}
632
633MapType::MapType(const MapType& other6) {
634 (void) other6;
635}
636MapType& MapType::operator=(const MapType& other7) {
637 (void) other7;
638 return *this;
639}
640void MapType::printTo(std::ostream& out) const {
641 using ::apache::thrift::to_string;
642 out << "MapType(";
643 out << ")";
644}
645
646
647ListType::~ListType() throw() {
648}
649
650std::ostream& operator<<(std::ostream& out, const ListType& obj)
651{
652 obj.printTo(out);
653 return out;
654}
655
656
657uint32_t ListType::read(::apache::thrift::protocol::TProtocol* iprot) {
658
659 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
660 uint32_t xfer = 0;
661 std::string fname;
662 ::apache::thrift::protocol::TType ftype;
663 int16_t fid;
664
665 xfer += iprot->readStructBegin(fname);
666
667 using ::apache::thrift::protocol::TProtocolException;
668
669
670 while (true)
671 {
672 xfer += iprot->readFieldBegin(fname, ftype, fid);
673 if (ftype == ::apache::thrift::protocol::T_STOP) {
674 break;
675 }
676 xfer += iprot->skip(ftype);
677 xfer += iprot->readFieldEnd();
678 }
679
680 xfer += iprot->readStructEnd();
681
682 return xfer;
683}
684
685uint32_t ListType::write(::apache::thrift::protocol::TProtocol* oprot) const {
686 uint32_t xfer = 0;
687 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
688 xfer += oprot->writeStructBegin("ListType");
689
690 xfer += oprot->writeFieldStop();
691 xfer += oprot->writeStructEnd();
692 return xfer;
693}
694
695void swap(ListType &a, ListType &b) {
696 using ::std::swap;
697 (void) a;
698 (void) b;
699}
700
701ListType::ListType(const ListType& other8) {
702 (void) other8;
703}
704ListType& ListType::operator=(const ListType& other9) {
705 (void) other9;
706 return *this;
707}
708void ListType::printTo(std::ostream& out) const {
709 using ::apache::thrift::to_string;
710 out << "ListType(";
711 out << ")";
712}
713
714
715EnumType::~EnumType() throw() {
716}
717
718std::ostream& operator<<(std::ostream& out, const EnumType& obj)
719{
720 obj.printTo(out);
721 return out;
722}
723
724
725uint32_t EnumType::read(::apache::thrift::protocol::TProtocol* iprot) {
726
727 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
728 uint32_t xfer = 0;
729 std::string fname;
730 ::apache::thrift::protocol::TType ftype;
731 int16_t fid;
732
733 xfer += iprot->readStructBegin(fname);
734
735 using ::apache::thrift::protocol::TProtocolException;
736
737
738 while (true)
739 {
740 xfer += iprot->readFieldBegin(fname, ftype, fid);
741 if (ftype == ::apache::thrift::protocol::T_STOP) {
742 break;
743 }
744 xfer += iprot->skip(ftype);
745 xfer += iprot->readFieldEnd();
746 }
747
748 xfer += iprot->readStructEnd();
749
750 return xfer;
751}
752
753uint32_t EnumType::write(::apache::thrift::protocol::TProtocol* oprot) const {
754 uint32_t xfer = 0;
755 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
756 xfer += oprot->writeStructBegin("EnumType");
757
758 xfer += oprot->writeFieldStop();
759 xfer += oprot->writeStructEnd();
760 return xfer;
761}
762
763void swap(EnumType &a, EnumType &b) {
764 using ::std::swap;
765 (void) a;
766 (void) b;
767}
768
769EnumType::EnumType(const EnumType& other10) {
770 (void) other10;
771}
772EnumType& EnumType::operator=(const EnumType& other11) {
773 (void) other11;
774 return *this;
775}
776void EnumType::printTo(std::ostream& out) const {
777 using ::apache::thrift::to_string;
778 out << "EnumType(";
779 out << ")";
780}
781
782
783DateType::~DateType() throw() {
784}
785
786std::ostream& operator<<(std::ostream& out, const DateType& obj)
787{
788 obj.printTo(out);
789 return out;
790}
791
792
793uint32_t DateType::read(::apache::thrift::protocol::TProtocol* iprot) {
794
795 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
796 uint32_t xfer = 0;
797 std::string fname;
798 ::apache::thrift::protocol::TType ftype;
799 int16_t fid;
800
801 xfer += iprot->readStructBegin(fname);
802
803 using ::apache::thrift::protocol::TProtocolException;
804
805
806 while (true)
807 {
808 xfer += iprot->readFieldBegin(fname, ftype, fid);
809 if (ftype == ::apache::thrift::protocol::T_STOP) {
810 break;
811 }
812 xfer += iprot->skip(ftype);
813 xfer += iprot->readFieldEnd();
814 }
815
816 xfer += iprot->readStructEnd();
817
818 return xfer;
819}
820
821uint32_t DateType::write(::apache::thrift::protocol::TProtocol* oprot) const {
822 uint32_t xfer = 0;
823 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
824 xfer += oprot->writeStructBegin("DateType");
825
826 xfer += oprot->writeFieldStop();
827 xfer += oprot->writeStructEnd();
828 return xfer;
829}
830
831void swap(DateType &a, DateType &b) {
832 using ::std::swap;
833 (void) a;
834 (void) b;
835}
836
837DateType::DateType(const DateType& other12) {
838 (void) other12;
839}
840DateType& DateType::operator=(const DateType& other13) {
841 (void) other13;
842 return *this;
843}
844void DateType::printTo(std::ostream& out) const {
845 using ::apache::thrift::to_string;
846 out << "DateType(";
847 out << ")";
848}
849
850
851NullType::~NullType() throw() {
852}
853
854std::ostream& operator<<(std::ostream& out, const NullType& obj)
855{
856 obj.printTo(out);
857 return out;
858}
859
860
861uint32_t NullType::read(::apache::thrift::protocol::TProtocol* iprot) {
862
863 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
864 uint32_t xfer = 0;
865 std::string fname;
866 ::apache::thrift::protocol::TType ftype;
867 int16_t fid;
868
869 xfer += iprot->readStructBegin(fname);
870
871 using ::apache::thrift::protocol::TProtocolException;
872
873
874 while (true)
875 {
876 xfer += iprot->readFieldBegin(fname, ftype, fid);
877 if (ftype == ::apache::thrift::protocol::T_STOP) {
878 break;
879 }
880 xfer += iprot->skip(ftype);
881 xfer += iprot->readFieldEnd();
882 }
883
884 xfer += iprot->readStructEnd();
885
886 return xfer;
887}
888
889uint32_t NullType::write(::apache::thrift::protocol::TProtocol* oprot) const {
890 uint32_t xfer = 0;
891 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
892 xfer += oprot->writeStructBegin("NullType");
893
894 xfer += oprot->writeFieldStop();
895 xfer += oprot->writeStructEnd();
896 return xfer;
897}
898
899void swap(NullType &a, NullType &b) {
900 using ::std::swap;
901 (void) a;
902 (void) b;
903}
904
905NullType::NullType(const NullType& other14) {
906 (void) other14;
907}
908NullType& NullType::operator=(const NullType& other15) {
909 (void) other15;
910 return *this;
911}
912void NullType::printTo(std::ostream& out) const {
913 using ::apache::thrift::to_string;
914 out << "NullType(";
915 out << ")";
916}
917
918
919DecimalType::~DecimalType() throw() {
920}
921
922
923void DecimalType::__set_scale(const int32_t val) {
924 this->scale = val;
925}
926
927void DecimalType::__set_precision(const int32_t val) {
928 this->precision = val;
929}
930std::ostream& operator<<(std::ostream& out, const DecimalType& obj)
931{
932 obj.printTo(out);
933 return out;
934}
935
936
937uint32_t DecimalType::read(::apache::thrift::protocol::TProtocol* iprot) {
938
939 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
940 uint32_t xfer = 0;
941 std::string fname;
942 ::apache::thrift::protocol::TType ftype;
943 int16_t fid;
944
945 xfer += iprot->readStructBegin(fname);
946
947 using ::apache::thrift::protocol::TProtocolException;
948
949 bool isset_scale = false;
950 bool isset_precision = false;
951
952 while (true)
953 {
954 xfer += iprot->readFieldBegin(fname, ftype, fid);
955 if (ftype == ::apache::thrift::protocol::T_STOP) {
956 break;
957 }
958 switch (fid)
959 {
960 case 1:
961 if (ftype == ::apache::thrift::protocol::T_I32) {
962 xfer += iprot->readI32(this->scale);
963 isset_scale = true;
964 } else {
965 xfer += iprot->skip(ftype);
966 }
967 break;
968 case 2:
969 if (ftype == ::apache::thrift::protocol::T_I32) {
970 xfer += iprot->readI32(this->precision);
971 isset_precision = true;
972 } else {
973 xfer += iprot->skip(ftype);
974 }
975 break;
976 default:
977 xfer += iprot->skip(ftype);
978 break;
979 }
980 xfer += iprot->readFieldEnd();
981 }
982
983 xfer += iprot->readStructEnd();
984
985 if (!isset_scale)
986 throw TProtocolException(TProtocolException::INVALID_DATA);
987 if (!isset_precision)
988 throw TProtocolException(TProtocolException::INVALID_DATA);
989 return xfer;
990}
991
992uint32_t DecimalType::write(::apache::thrift::protocol::TProtocol* oprot) const {
993 uint32_t xfer = 0;
994 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
995 xfer += oprot->writeStructBegin("DecimalType");
996
997 xfer += oprot->writeFieldBegin("scale", ::apache::thrift::protocol::T_I32, 1);
998 xfer += oprot->writeI32(this->scale);
999 xfer += oprot->writeFieldEnd();
1000
1001 xfer += oprot->writeFieldBegin("precision", ::apache::thrift::protocol::T_I32, 2);
1002 xfer += oprot->writeI32(this->precision);
1003 xfer += oprot->writeFieldEnd();
1004
1005 xfer += oprot->writeFieldStop();
1006 xfer += oprot->writeStructEnd();
1007 return xfer;
1008}
1009
1010void swap(DecimalType &a, DecimalType &b) {
1011 using ::std::swap;
1012 swap(a.scale, b.scale);
1013 swap(a.precision, b.precision);
1014}
1015
1016DecimalType::DecimalType(const DecimalType& other16) {
1017 scale = other16.scale;
1018 precision = other16.precision;
1019}
1020DecimalType& DecimalType::operator=(const DecimalType& other17) {
1021 scale = other17.scale;
1022 precision = other17.precision;
1023 return *this;
1024}
1025void DecimalType::printTo(std::ostream& out) const {
1026 using ::apache::thrift::to_string;
1027 out << "DecimalType(";
1028 out << "scale=" << to_string(scale);
1029 out << ", " << "precision=" << to_string(precision);
1030 out << ")";
1031}
1032
1033
1034MilliSeconds::~MilliSeconds() throw() {
1035}
1036
1037std::ostream& operator<<(std::ostream& out, const MilliSeconds& obj)
1038{
1039 obj.printTo(out);
1040 return out;
1041}
1042
1043
1044uint32_t MilliSeconds::read(::apache::thrift::protocol::TProtocol* iprot) {
1045
1046 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1047 uint32_t xfer = 0;
1048 std::string fname;
1049 ::apache::thrift::protocol::TType ftype;
1050 int16_t fid;
1051
1052 xfer += iprot->readStructBegin(fname);
1053
1054 using ::apache::thrift::protocol::TProtocolException;
1055
1056
1057 while (true)
1058 {
1059 xfer += iprot->readFieldBegin(fname, ftype, fid);
1060 if (ftype == ::apache::thrift::protocol::T_STOP) {
1061 break;
1062 }
1063 xfer += iprot->skip(ftype);
1064 xfer += iprot->readFieldEnd();
1065 }
1066
1067 xfer += iprot->readStructEnd();
1068
1069 return xfer;
1070}
1071
1072uint32_t MilliSeconds::write(::apache::thrift::protocol::TProtocol* oprot) const {
1073 uint32_t xfer = 0;
1074 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1075 xfer += oprot->writeStructBegin("MilliSeconds");
1076
1077 xfer += oprot->writeFieldStop();
1078 xfer += oprot->writeStructEnd();
1079 return xfer;
1080}
1081
1082void swap(MilliSeconds &a, MilliSeconds &b) {
1083 using ::std::swap;
1084 (void) a;
1085 (void) b;
1086}
1087
1088MilliSeconds::MilliSeconds(const MilliSeconds& other18) {
1089 (void) other18;
1090}
1091MilliSeconds& MilliSeconds::operator=(const MilliSeconds& other19) {
1092 (void) other19;
1093 return *this;
1094}
1095void MilliSeconds::printTo(std::ostream& out) const {
1096 using ::apache::thrift::to_string;
1097 out << "MilliSeconds(";
1098 out << ")";
1099}
1100
1101
1102MicroSeconds::~MicroSeconds() throw() {
1103}
1104
1105std::ostream& operator<<(std::ostream& out, const MicroSeconds& obj)
1106{
1107 obj.printTo(out);
1108 return out;
1109}
1110
1111
1112uint32_t MicroSeconds::read(::apache::thrift::protocol::TProtocol* iprot) {
1113
1114 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1115 uint32_t xfer = 0;
1116 std::string fname;
1117 ::apache::thrift::protocol::TType ftype;
1118 int16_t fid;
1119
1120 xfer += iprot->readStructBegin(fname);
1121
1122 using ::apache::thrift::protocol::TProtocolException;
1123
1124
1125 while (true)
1126 {
1127 xfer += iprot->readFieldBegin(fname, ftype, fid);
1128 if (ftype == ::apache::thrift::protocol::T_STOP) {
1129 break;
1130 }
1131 xfer += iprot->skip(ftype);
1132 xfer += iprot->readFieldEnd();
1133 }
1134
1135 xfer += iprot->readStructEnd();
1136
1137 return xfer;
1138}
1139
1140uint32_t MicroSeconds::write(::apache::thrift::protocol::TProtocol* oprot) const {
1141 uint32_t xfer = 0;
1142 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1143 xfer += oprot->writeStructBegin("MicroSeconds");
1144
1145 xfer += oprot->writeFieldStop();
1146 xfer += oprot->writeStructEnd();
1147 return xfer;
1148}
1149
1150void swap(MicroSeconds &a, MicroSeconds &b) {
1151 using ::std::swap;
1152 (void) a;
1153 (void) b;
1154}
1155
1156MicroSeconds::MicroSeconds(const MicroSeconds& other20) {
1157 (void) other20;
1158}
1159MicroSeconds& MicroSeconds::operator=(const MicroSeconds& other21) {
1160 (void) other21;
1161 return *this;
1162}
1163void MicroSeconds::printTo(std::ostream& out) const {
1164 using ::apache::thrift::to_string;
1165 out << "MicroSeconds(";
1166 out << ")";
1167}
1168
1169
1170TimeUnit::~TimeUnit() throw() {
1171}
1172
1173
1174void TimeUnit::__set_MILLIS(const MilliSeconds& val) {
1175 this->MILLIS = val;
1176__isset.MILLIS = true;
1177}
1178
1179void TimeUnit::__set_MICROS(const MicroSeconds& val) {
1180 this->MICROS = val;
1181__isset.MICROS = true;
1182}
1183std::ostream& operator<<(std::ostream& out, const TimeUnit& obj)
1184{
1185 obj.printTo(out);
1186 return out;
1187}
1188
1189
1190uint32_t TimeUnit::read(::apache::thrift::protocol::TProtocol* iprot) {
1191
1192 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1193 uint32_t xfer = 0;
1194 std::string fname;
1195 ::apache::thrift::protocol::TType ftype;
1196 int16_t fid;
1197
1198 xfer += iprot->readStructBegin(fname);
1199
1200 using ::apache::thrift::protocol::TProtocolException;
1201
1202
1203 while (true)
1204 {
1205 xfer += iprot->readFieldBegin(fname, ftype, fid);
1206 if (ftype == ::apache::thrift::protocol::T_STOP) {
1207 break;
1208 }
1209 switch (fid)
1210 {
1211 case 1:
1212 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1213 xfer += this->MILLIS.read(iprot);
1214 this->__isset.MILLIS = true;
1215 } else {
1216 xfer += iprot->skip(ftype);
1217 }
1218 break;
1219 case 2:
1220 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1221 xfer += this->MICROS.read(iprot);
1222 this->__isset.MICROS = true;
1223 } else {
1224 xfer += iprot->skip(ftype);
1225 }
1226 break;
1227 default:
1228 xfer += iprot->skip(ftype);
1229 break;
1230 }
1231 xfer += iprot->readFieldEnd();
1232 }
1233
1234 xfer += iprot->readStructEnd();
1235
1236 return xfer;
1237}
1238
1239uint32_t TimeUnit::write(::apache::thrift::protocol::TProtocol* oprot) const {
1240 uint32_t xfer = 0;
1241 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1242 xfer += oprot->writeStructBegin("TimeUnit");
1243
1244 if (this->__isset.MILLIS) {
1245 xfer += oprot->writeFieldBegin("MILLIS", ::apache::thrift::protocol::T_STRUCT, 1);
1246 xfer += this->MILLIS.write(oprot);
1247 xfer += oprot->writeFieldEnd();
1248 }
1249 if (this->__isset.MICROS) {
1250 xfer += oprot->writeFieldBegin("MICROS", ::apache::thrift::protocol::T_STRUCT, 2);
1251 xfer += this->MICROS.write(oprot);
1252 xfer += oprot->writeFieldEnd();
1253 }
1254 xfer += oprot->writeFieldStop();
1255 xfer += oprot->writeStructEnd();
1256 return xfer;
1257}
1258
1259void swap(TimeUnit &a, TimeUnit &b) {
1260 using ::std::swap;
1261 swap(a.MILLIS, b.MILLIS);
1262 swap(a.MICROS, b.MICROS);
1263 swap(a.__isset, b.__isset);
1264}
1265
1266TimeUnit::TimeUnit(const TimeUnit& other22) {
1267 MILLIS = other22.MILLIS;
1268 MICROS = other22.MICROS;
1269 __isset = other22.__isset;
1270}
1271TimeUnit& TimeUnit::operator=(const TimeUnit& other23) {
1272 MILLIS = other23.MILLIS;
1273 MICROS = other23.MICROS;
1274 __isset = other23.__isset;
1275 return *this;
1276}
1277void TimeUnit::printTo(std::ostream& out) const {
1278 using ::apache::thrift::to_string;
1279 out << "TimeUnit(";
1280 out << "MILLIS="; (__isset.MILLIS ? (out << to_string(MILLIS)) : (out << "<null>"));
1281 out << ", " << "MICROS="; (__isset.MICROS ? (out << to_string(MICROS)) : (out << "<null>"));
1282 out << ")";
1283}
1284
1285
1286TimestampType::~TimestampType() throw() {
1287}
1288
1289
1290void TimestampType::__set_isAdjustedToUTC(const bool val) {
1291 this->isAdjustedToUTC = val;
1292}
1293
1294void TimestampType::__set_unit(const TimeUnit& val) {
1295 this->unit = val;
1296}
1297std::ostream& operator<<(std::ostream& out, const TimestampType& obj)
1298{
1299 obj.printTo(out);
1300 return out;
1301}
1302
1303
1304uint32_t TimestampType::read(::apache::thrift::protocol::TProtocol* iprot) {
1305
1306 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1307 uint32_t xfer = 0;
1308 std::string fname;
1309 ::apache::thrift::protocol::TType ftype;
1310 int16_t fid;
1311
1312 xfer += iprot->readStructBegin(fname);
1313
1314 using ::apache::thrift::protocol::TProtocolException;
1315
1316 bool isset_isAdjustedToUTC = false;
1317 bool isset_unit = false;
1318
1319 while (true)
1320 {
1321 xfer += iprot->readFieldBegin(fname, ftype, fid);
1322 if (ftype == ::apache::thrift::protocol::T_STOP) {
1323 break;
1324 }
1325 switch (fid)
1326 {
1327 case 1:
1328 if (ftype == ::apache::thrift::protocol::T_BOOL) {
1329 xfer += iprot->readBool(this->isAdjustedToUTC);
1330 isset_isAdjustedToUTC = true;
1331 } else {
1332 xfer += iprot->skip(ftype);
1333 }
1334 break;
1335 case 2:
1336 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1337 xfer += this->unit.read(iprot);
1338 isset_unit = true;
1339 } else {
1340 xfer += iprot->skip(ftype);
1341 }
1342 break;
1343 default:
1344 xfer += iprot->skip(ftype);
1345 break;
1346 }
1347 xfer += iprot->readFieldEnd();
1348 }
1349
1350 xfer += iprot->readStructEnd();
1351
1352 if (!isset_isAdjustedToUTC)
1353 throw TProtocolException(TProtocolException::INVALID_DATA);
1354 if (!isset_unit)
1355 throw TProtocolException(TProtocolException::INVALID_DATA);
1356 return xfer;
1357}
1358
1359uint32_t TimestampType::write(::apache::thrift::protocol::TProtocol* oprot) const {
1360 uint32_t xfer = 0;
1361 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1362 xfer += oprot->writeStructBegin("TimestampType");
1363
1364 xfer += oprot->writeFieldBegin("isAdjustedToUTC", ::apache::thrift::protocol::T_BOOL, 1);
1365 xfer += oprot->writeBool(this->isAdjustedToUTC);
1366 xfer += oprot->writeFieldEnd();
1367
1368 xfer += oprot->writeFieldBegin("unit", ::apache::thrift::protocol::T_STRUCT, 2);
1369 xfer += this->unit.write(oprot);
1370 xfer += oprot->writeFieldEnd();
1371
1372 xfer += oprot->writeFieldStop();
1373 xfer += oprot->writeStructEnd();
1374 return xfer;
1375}
1376
1377void swap(TimestampType &a, TimestampType &b) {
1378 using ::std::swap;
1379 swap(a.isAdjustedToUTC, b.isAdjustedToUTC);
1380 swap(a.unit, b.unit);
1381}
1382
1383TimestampType::TimestampType(const TimestampType& other24) {
1384 isAdjustedToUTC = other24.isAdjustedToUTC;
1385 unit = other24.unit;
1386}
1387TimestampType& TimestampType::operator=(const TimestampType& other25) {
1388 isAdjustedToUTC = other25.isAdjustedToUTC;
1389 unit = other25.unit;
1390 return *this;
1391}
1392void TimestampType::printTo(std::ostream& out) const {
1393 using ::apache::thrift::to_string;
1394 out << "TimestampType(";
1395 out << "isAdjustedToUTC=" << to_string(isAdjustedToUTC);
1396 out << ", " << "unit=" << to_string(unit);
1397 out << ")";
1398}
1399
1400
1401TimeType::~TimeType() throw() {
1402}
1403
1404
1405void TimeType::__set_isAdjustedToUTC(const bool val) {
1406 this->isAdjustedToUTC = val;
1407}
1408
1409void TimeType::__set_unit(const TimeUnit& val) {
1410 this->unit = val;
1411}
1412std::ostream& operator<<(std::ostream& out, const TimeType& obj)
1413{
1414 obj.printTo(out);
1415 return out;
1416}
1417
1418
1419uint32_t TimeType::read(::apache::thrift::protocol::TProtocol* iprot) {
1420
1421 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1422 uint32_t xfer = 0;
1423 std::string fname;
1424 ::apache::thrift::protocol::TType ftype;
1425 int16_t fid;
1426
1427 xfer += iprot->readStructBegin(fname);
1428
1429 using ::apache::thrift::protocol::TProtocolException;
1430
1431 bool isset_isAdjustedToUTC = false;
1432 bool isset_unit = false;
1433
1434 while (true)
1435 {
1436 xfer += iprot->readFieldBegin(fname, ftype, fid);
1437 if (ftype == ::apache::thrift::protocol::T_STOP) {
1438 break;
1439 }
1440 switch (fid)
1441 {
1442 case 1:
1443 if (ftype == ::apache::thrift::protocol::T_BOOL) {
1444 xfer += iprot->readBool(this->isAdjustedToUTC);
1445 isset_isAdjustedToUTC = true;
1446 } else {
1447 xfer += iprot->skip(ftype);
1448 }
1449 break;
1450 case 2:
1451 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1452 xfer += this->unit.read(iprot);
1453 isset_unit = true;
1454 } else {
1455 xfer += iprot->skip(ftype);
1456 }
1457 break;
1458 default:
1459 xfer += iprot->skip(ftype);
1460 break;
1461 }
1462 xfer += iprot->readFieldEnd();
1463 }
1464
1465 xfer += iprot->readStructEnd();
1466
1467 if (!isset_isAdjustedToUTC)
1468 throw TProtocolException(TProtocolException::INVALID_DATA);
1469 if (!isset_unit)
1470 throw TProtocolException(TProtocolException::INVALID_DATA);
1471 return xfer;
1472}
1473
1474uint32_t TimeType::write(::apache::thrift::protocol::TProtocol* oprot) const {
1475 uint32_t xfer = 0;
1476 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1477 xfer += oprot->writeStructBegin("TimeType");
1478
1479 xfer += oprot->writeFieldBegin("isAdjustedToUTC", ::apache::thrift::protocol::T_BOOL, 1);
1480 xfer += oprot->writeBool(this->isAdjustedToUTC);
1481 xfer += oprot->writeFieldEnd();
1482
1483 xfer += oprot->writeFieldBegin("unit", ::apache::thrift::protocol::T_STRUCT, 2);
1484 xfer += this->unit.write(oprot);
1485 xfer += oprot->writeFieldEnd();
1486
1487 xfer += oprot->writeFieldStop();
1488 xfer += oprot->writeStructEnd();
1489 return xfer;
1490}
1491
1492void swap(TimeType &a, TimeType &b) {
1493 using ::std::swap;
1494 swap(a.isAdjustedToUTC, b.isAdjustedToUTC);
1495 swap(a.unit, b.unit);
1496}
1497
1498TimeType::TimeType(const TimeType& other26) {
1499 isAdjustedToUTC = other26.isAdjustedToUTC;
1500 unit = other26.unit;
1501}
1502TimeType& TimeType::operator=(const TimeType& other27) {
1503 isAdjustedToUTC = other27.isAdjustedToUTC;
1504 unit = other27.unit;
1505 return *this;
1506}
1507void TimeType::printTo(std::ostream& out) const {
1508 using ::apache::thrift::to_string;
1509 out << "TimeType(";
1510 out << "isAdjustedToUTC=" << to_string(isAdjustedToUTC);
1511 out << ", " << "unit=" << to_string(unit);
1512 out << ")";
1513}
1514
1515
1516IntType::~IntType() throw() {
1517}
1518
1519
1520void IntType::__set_bitWidth(const int8_t val) {
1521 this->bitWidth = val;
1522}
1523
1524void IntType::__set_isSigned(const bool val) {
1525 this->isSigned = val;
1526}
1527std::ostream& operator<<(std::ostream& out, const IntType& obj)
1528{
1529 obj.printTo(out);
1530 return out;
1531}
1532
1533
1534uint32_t IntType::read(::apache::thrift::protocol::TProtocol* iprot) {
1535
1536 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1537 uint32_t xfer = 0;
1538 std::string fname;
1539 ::apache::thrift::protocol::TType ftype;
1540 int16_t fid;
1541
1542 xfer += iprot->readStructBegin(fname);
1543
1544 using ::apache::thrift::protocol::TProtocolException;
1545
1546 bool isset_bitWidth = false;
1547 bool isset_isSigned = false;
1548
1549 while (true)
1550 {
1551 xfer += iprot->readFieldBegin(fname, ftype, fid);
1552 if (ftype == ::apache::thrift::protocol::T_STOP) {
1553 break;
1554 }
1555 switch (fid)
1556 {
1557 case 1:
1558 if (ftype == ::apache::thrift::protocol::T_BYTE) {
1559 xfer += iprot->readByte(this->bitWidth);
1560 isset_bitWidth = true;
1561 } else {
1562 xfer += iprot->skip(ftype);
1563 }
1564 break;
1565 case 2:
1566 if (ftype == ::apache::thrift::protocol::T_BOOL) {
1567 xfer += iprot->readBool(this->isSigned);
1568 isset_isSigned = true;
1569 } else {
1570 xfer += iprot->skip(ftype);
1571 }
1572 break;
1573 default:
1574 xfer += iprot->skip(ftype);
1575 break;
1576 }
1577 xfer += iprot->readFieldEnd();
1578 }
1579
1580 xfer += iprot->readStructEnd();
1581
1582 if (!isset_bitWidth)
1583 throw TProtocolException(TProtocolException::INVALID_DATA);
1584 if (!isset_isSigned)
1585 throw TProtocolException(TProtocolException::INVALID_DATA);
1586 return xfer;
1587}
1588
1589uint32_t IntType::write(::apache::thrift::protocol::TProtocol* oprot) const {
1590 uint32_t xfer = 0;
1591 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1592 xfer += oprot->writeStructBegin("IntType");
1593
1594 xfer += oprot->writeFieldBegin("bitWidth", ::apache::thrift::protocol::T_BYTE, 1);
1595 xfer += oprot->writeByte(this->bitWidth);
1596 xfer += oprot->writeFieldEnd();
1597
1598 xfer += oprot->writeFieldBegin("isSigned", ::apache::thrift::protocol::T_BOOL, 2);
1599 xfer += oprot->writeBool(this->isSigned);
1600 xfer += oprot->writeFieldEnd();
1601
1602 xfer += oprot->writeFieldStop();
1603 xfer += oprot->writeStructEnd();
1604 return xfer;
1605}
1606
1607void swap(IntType &a, IntType &b) {
1608 using ::std::swap;
1609 swap(a.bitWidth, b.bitWidth);
1610 swap(a.isSigned, b.isSigned);
1611}
1612
1613IntType::IntType(const IntType& other28) {
1614 bitWidth = other28.bitWidth;
1615 isSigned = other28.isSigned;
1616}
1617IntType& IntType::operator=(const IntType& other29) {
1618 bitWidth = other29.bitWidth;
1619 isSigned = other29.isSigned;
1620 return *this;
1621}
1622void IntType::printTo(std::ostream& out) const {
1623 using ::apache::thrift::to_string;
1624 out << "IntType(";
1625 out << "bitWidth=" << to_string(bitWidth);
1626 out << ", " << "isSigned=" << to_string(isSigned);
1627 out << ")";
1628}
1629
1630
1631JsonType::~JsonType() throw() {
1632}
1633
1634std::ostream& operator<<(std::ostream& out, const JsonType& obj)
1635{
1636 obj.printTo(out);
1637 return out;
1638}
1639
1640
1641uint32_t JsonType::read(::apache::thrift::protocol::TProtocol* iprot) {
1642
1643 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1644 uint32_t xfer = 0;
1645 std::string fname;
1646 ::apache::thrift::protocol::TType ftype;
1647 int16_t fid;
1648
1649 xfer += iprot->readStructBegin(fname);
1650
1651 using ::apache::thrift::protocol::TProtocolException;
1652
1653
1654 while (true)
1655 {
1656 xfer += iprot->readFieldBegin(fname, ftype, fid);
1657 if (ftype == ::apache::thrift::protocol::T_STOP) {
1658 break;
1659 }
1660 xfer += iprot->skip(ftype);
1661 xfer += iprot->readFieldEnd();
1662 }
1663
1664 xfer += iprot->readStructEnd();
1665
1666 return xfer;
1667}
1668
1669uint32_t JsonType::write(::apache::thrift::protocol::TProtocol* oprot) const {
1670 uint32_t xfer = 0;
1671 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1672 xfer += oprot->writeStructBegin("JsonType");
1673
1674 xfer += oprot->writeFieldStop();
1675 xfer += oprot->writeStructEnd();
1676 return xfer;
1677}
1678
1679void swap(JsonType &a, JsonType &b) {
1680 using ::std::swap;
1681 (void) a;
1682 (void) b;
1683}
1684
1685JsonType::JsonType(const JsonType& other30) {
1686 (void) other30;
1687}
1688JsonType& JsonType::operator=(const JsonType& other31) {
1689 (void) other31;
1690 return *this;
1691}
1692void JsonType::printTo(std::ostream& out) const {
1693 using ::apache::thrift::to_string;
1694 out << "JsonType(";
1695 out << ")";
1696}
1697
1698
1699BsonType::~BsonType() throw() {
1700}
1701
1702std::ostream& operator<<(std::ostream& out, const BsonType& obj)
1703{
1704 obj.printTo(out);
1705 return out;
1706}
1707
1708
1709uint32_t BsonType::read(::apache::thrift::protocol::TProtocol* iprot) {
1710
1711 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1712 uint32_t xfer = 0;
1713 std::string fname;
1714 ::apache::thrift::protocol::TType ftype;
1715 int16_t fid;
1716
1717 xfer += iprot->readStructBegin(fname);
1718
1719 using ::apache::thrift::protocol::TProtocolException;
1720
1721
1722 while (true)
1723 {
1724 xfer += iprot->readFieldBegin(fname, ftype, fid);
1725 if (ftype == ::apache::thrift::protocol::T_STOP) {
1726 break;
1727 }
1728 xfer += iprot->skip(ftype);
1729 xfer += iprot->readFieldEnd();
1730 }
1731
1732 xfer += iprot->readStructEnd();
1733
1734 return xfer;
1735}
1736
1737uint32_t BsonType::write(::apache::thrift::protocol::TProtocol* oprot) const {
1738 uint32_t xfer = 0;
1739 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1740 xfer += oprot->writeStructBegin("BsonType");
1741
1742 xfer += oprot->writeFieldStop();
1743 xfer += oprot->writeStructEnd();
1744 return xfer;
1745}
1746
1747void swap(BsonType &a, BsonType &b) {
1748 using ::std::swap;
1749 (void) a;
1750 (void) b;
1751}
1752
1753BsonType::BsonType(const BsonType& other32) {
1754 (void) other32;
1755}
1756BsonType& BsonType::operator=(const BsonType& other33) {
1757 (void) other33;
1758 return *this;
1759}
1760void BsonType::printTo(std::ostream& out) const {
1761 using ::apache::thrift::to_string;
1762 out << "BsonType(";
1763 out << ")";
1764}
1765
1766
1767LogicalType::~LogicalType() throw() {
1768}
1769
1770
1771void LogicalType::__set_STRING(const StringType& val) {
1772 this->STRING = val;
1773__isset.STRING = true;
1774}
1775
1776void LogicalType::__set_MAP(const MapType& val) {
1777 this->MAP = val;
1778__isset.MAP = true;
1779}
1780
1781void LogicalType::__set_LIST(const ListType& val) {
1782 this->LIST = val;
1783__isset.LIST = true;
1784}
1785
1786void LogicalType::__set_ENUM(const EnumType& val) {
1787 this->ENUM = val;
1788__isset.ENUM = true;
1789}
1790
1791void LogicalType::__set_DECIMAL(const DecimalType& val) {
1792 this->DECIMAL = val;
1793__isset.DECIMAL = true;
1794}
1795
1796void LogicalType::__set_DATE(const DateType& val) {
1797 this->DATE = val;
1798__isset.DATE = true;
1799}
1800
1801void LogicalType::__set_TIME(const TimeType& val) {
1802 this->TIME = val;
1803__isset.TIME = true;
1804}
1805
1806void LogicalType::__set_TIMESTAMP(const TimestampType& val) {
1807 this->TIMESTAMP = val;
1808__isset.TIMESTAMP = true;
1809}
1810
1811void LogicalType::__set_INTEGER(const IntType& val) {
1812 this->INTEGER = val;
1813__isset.INTEGER = true;
1814}
1815
1816void LogicalType::__set_UNKNOWN(const NullType& val) {
1817 this->UNKNOWN = val;
1818__isset.UNKNOWN = true;
1819}
1820
1821void LogicalType::__set_JSON(const JsonType& val) {
1822 this->JSON = val;
1823__isset.JSON = true;
1824}
1825
1826void LogicalType::__set_BSON(const BsonType& val) {
1827 this->BSON = val;
1828__isset.BSON = true;
1829}
1830std::ostream& operator<<(std::ostream& out, const LogicalType& obj)
1831{
1832 obj.printTo(out);
1833 return out;
1834}
1835
1836
1837uint32_t LogicalType::read(::apache::thrift::protocol::TProtocol* iprot) {
1838
1839 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
1840 uint32_t xfer = 0;
1841 std::string fname;
1842 ::apache::thrift::protocol::TType ftype;
1843 int16_t fid;
1844
1845 xfer += iprot->readStructBegin(fname);
1846
1847 using ::apache::thrift::protocol::TProtocolException;
1848
1849
1850 while (true)
1851 {
1852 xfer += iprot->readFieldBegin(fname, ftype, fid);
1853 if (ftype == ::apache::thrift::protocol::T_STOP) {
1854 break;
1855 }
1856 switch (fid)
1857 {
1858 case 1:
1859 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1860 xfer += this->STRING.read(iprot);
1861 this->__isset.STRING = true;
1862 } else {
1863 xfer += iprot->skip(ftype);
1864 }
1865 break;
1866 case 2:
1867 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1868 xfer += this->MAP.read(iprot);
1869 this->__isset.MAP = true;
1870 } else {
1871 xfer += iprot->skip(ftype);
1872 }
1873 break;
1874 case 3:
1875 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1876 xfer += this->LIST.read(iprot);
1877 this->__isset.LIST = true;
1878 } else {
1879 xfer += iprot->skip(ftype);
1880 }
1881 break;
1882 case 4:
1883 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1884 xfer += this->ENUM.read(iprot);
1885 this->__isset.ENUM = true;
1886 } else {
1887 xfer += iprot->skip(ftype);
1888 }
1889 break;
1890 case 5:
1891 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1892 xfer += this->DECIMAL.read(iprot);
1893 this->__isset.DECIMAL = true;
1894 } else {
1895 xfer += iprot->skip(ftype);
1896 }
1897 break;
1898 case 6:
1899 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1900 xfer += this->DATE.read(iprot);
1901 this->__isset.DATE = true;
1902 } else {
1903 xfer += iprot->skip(ftype);
1904 }
1905 break;
1906 case 7:
1907 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1908 xfer += this->TIME.read(iprot);
1909 this->__isset.TIME = true;
1910 } else {
1911 xfer += iprot->skip(ftype);
1912 }
1913 break;
1914 case 8:
1915 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1916 xfer += this->TIMESTAMP.read(iprot);
1917 this->__isset.TIMESTAMP = true;
1918 } else {
1919 xfer += iprot->skip(ftype);
1920 }
1921 break;
1922 case 10:
1923 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1924 xfer += this->INTEGER.read(iprot);
1925 this->__isset.INTEGER = true;
1926 } else {
1927 xfer += iprot->skip(ftype);
1928 }
1929 break;
1930 case 11:
1931 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1932 xfer += this->UNKNOWN.read(iprot);
1933 this->__isset.UNKNOWN = true;
1934 } else {
1935 xfer += iprot->skip(ftype);
1936 }
1937 break;
1938 case 12:
1939 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1940 xfer += this->JSON.read(iprot);
1941 this->__isset.JSON = true;
1942 } else {
1943 xfer += iprot->skip(ftype);
1944 }
1945 break;
1946 case 13:
1947 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
1948 xfer += this->BSON.read(iprot);
1949 this->__isset.BSON = true;
1950 } else {
1951 xfer += iprot->skip(ftype);
1952 }
1953 break;
1954 default:
1955 xfer += iprot->skip(ftype);
1956 break;
1957 }
1958 xfer += iprot->readFieldEnd();
1959 }
1960
1961 xfer += iprot->readStructEnd();
1962
1963 return xfer;
1964}
1965
1966uint32_t LogicalType::write(::apache::thrift::protocol::TProtocol* oprot) const {
1967 uint32_t xfer = 0;
1968 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
1969 xfer += oprot->writeStructBegin("LogicalType");
1970
1971 if (this->__isset.STRING) {
1972 xfer += oprot->writeFieldBegin("STRING", ::apache::thrift::protocol::T_STRUCT, 1);
1973 xfer += this->STRING.write(oprot);
1974 xfer += oprot->writeFieldEnd();
1975 }
1976 if (this->__isset.MAP) {
1977 xfer += oprot->writeFieldBegin("MAP", ::apache::thrift::protocol::T_STRUCT, 2);
1978 xfer += this->MAP.write(oprot);
1979 xfer += oprot->writeFieldEnd();
1980 }
1981 if (this->__isset.LIST) {
1982 xfer += oprot->writeFieldBegin("LIST", ::apache::thrift::protocol::T_STRUCT, 3);
1983 xfer += this->LIST.write(oprot);
1984 xfer += oprot->writeFieldEnd();
1985 }
1986 if (this->__isset.ENUM) {
1987 xfer += oprot->writeFieldBegin("ENUM", ::apache::thrift::protocol::T_STRUCT, 4);
1988 xfer += this->ENUM.write(oprot);
1989 xfer += oprot->writeFieldEnd();
1990 }
1991 if (this->__isset.DECIMAL) {
1992 xfer += oprot->writeFieldBegin("DECIMAL", ::apache::thrift::protocol::T_STRUCT, 5);
1993 xfer += this->DECIMAL.write(oprot);
1994 xfer += oprot->writeFieldEnd();
1995 }
1996 if (this->__isset.DATE) {
1997 xfer += oprot->writeFieldBegin("DATE", ::apache::thrift::protocol::T_STRUCT, 6);
1998 xfer += this->DATE.write(oprot);
1999 xfer += oprot->writeFieldEnd();
2000 }
2001 if (this->__isset.TIME) {
2002 xfer += oprot->writeFieldBegin("TIME", ::apache::thrift::protocol::T_STRUCT, 7);
2003 xfer += this->TIME.write(oprot);
2004 xfer += oprot->writeFieldEnd();
2005 }
2006 if (this->__isset.TIMESTAMP) {
2007 xfer += oprot->writeFieldBegin("TIMESTAMP", ::apache::thrift::protocol::T_STRUCT, 8);
2008 xfer += this->TIMESTAMP.write(oprot);
2009 xfer += oprot->writeFieldEnd();
2010 }
2011 if (this->__isset.INTEGER) {
2012 xfer += oprot->writeFieldBegin("INTEGER", ::apache::thrift::protocol::T_STRUCT, 10);
2013 xfer += this->INTEGER.write(oprot);
2014 xfer += oprot->writeFieldEnd();
2015 }
2016 if (this->__isset.UNKNOWN) {
2017 xfer += oprot->writeFieldBegin("UNKNOWN", ::apache::thrift::protocol::T_STRUCT, 11);
2018 xfer += this->UNKNOWN.write(oprot);
2019 xfer += oprot->writeFieldEnd();
2020 }
2021 if (this->__isset.JSON) {
2022 xfer += oprot->writeFieldBegin("JSON", ::apache::thrift::protocol::T_STRUCT, 12);
2023 xfer += this->JSON.write(oprot);
2024 xfer += oprot->writeFieldEnd();
2025 }
2026 if (this->__isset.BSON) {
2027 xfer += oprot->writeFieldBegin("BSON", ::apache::thrift::protocol::T_STRUCT, 13);
2028 xfer += this->BSON.write(oprot);
2029 xfer += oprot->writeFieldEnd();
2030 }
2031 xfer += oprot->writeFieldStop();
2032 xfer += oprot->writeStructEnd();
2033 return xfer;
2034}
2035
2036void swap(LogicalType &a, LogicalType &b) {
2037 using ::std::swap;
2038 swap(a.STRING, b.STRING);
2039 swap(a.MAP, b.MAP);
2040 swap(a.LIST, b.LIST);
2041 swap(a.ENUM, b.ENUM);
2042 swap(a.DECIMAL, b.DECIMAL);
2043 swap(a.DATE, b.DATE);
2044 swap(a.TIME, b.TIME);
2045 swap(a.TIMESTAMP, b.TIMESTAMP);
2046 swap(a.INTEGER, b.INTEGER);
2047 swap(a.UNKNOWN, b.UNKNOWN);
2048 swap(a.JSON, b.JSON);
2049 swap(a.BSON, b.BSON);
2050 swap(a.__isset, b.__isset);
2051}
2052
2053LogicalType::LogicalType(const LogicalType& other34) {
2054 STRING = other34.STRING;
2055 MAP = other34.MAP;
2056 LIST = other34.LIST;
2057 ENUM = other34.ENUM;
2058 DECIMAL = other34.DECIMAL;
2059 DATE = other34.DATE;
2060 TIME = other34.TIME;
2061 TIMESTAMP = other34.TIMESTAMP;
2062 INTEGER = other34.INTEGER;
2063 UNKNOWN = other34.UNKNOWN;
2064 JSON = other34.JSON;
2065 BSON = other34.BSON;
2066 __isset = other34.__isset;
2067}
2068LogicalType& LogicalType::operator=(const LogicalType& other35) {
2069 STRING = other35.STRING;
2070 MAP = other35.MAP;
2071 LIST = other35.LIST;
2072 ENUM = other35.ENUM;
2073 DECIMAL = other35.DECIMAL;
2074 DATE = other35.DATE;
2075 TIME = other35.TIME;
2076 TIMESTAMP = other35.TIMESTAMP;
2077 INTEGER = other35.INTEGER;
2078 UNKNOWN = other35.UNKNOWN;
2079 JSON = other35.JSON;
2080 BSON = other35.BSON;
2081 __isset = other35.__isset;
2082 return *this;
2083}
2084void LogicalType::printTo(std::ostream& out) const {
2085 using ::apache::thrift::to_string;
2086 out << "LogicalType(";
2087 out << "STRING="; (__isset.STRING ? (out << to_string(STRING)) : (out << "<null>"));
2088 out << ", " << "MAP="; (__isset.MAP ? (out << to_string(MAP)) : (out << "<null>"));
2089 out << ", " << "LIST="; (__isset.LIST ? (out << to_string(LIST)) : (out << "<null>"));
2090 out << ", " << "ENUM="; (__isset.ENUM ? (out << to_string(ENUM)) : (out << "<null>"));
2091 out << ", " << "DECIMAL="; (__isset.DECIMAL ? (out << to_string(DECIMAL)) : (out << "<null>"));
2092 out << ", " << "DATE="; (__isset.DATE ? (out << to_string(DATE)) : (out << "<null>"));
2093 out << ", " << "TIME="; (__isset.TIME ? (out << to_string(TIME)) : (out << "<null>"));
2094 out << ", " << "TIMESTAMP="; (__isset.TIMESTAMP ? (out << to_string(TIMESTAMP)) : (out << "<null>"));
2095 out << ", " << "INTEGER="; (__isset.INTEGER ? (out << to_string(INTEGER)) : (out << "<null>"));
2096 out << ", " << "UNKNOWN="; (__isset.UNKNOWN ? (out << to_string(UNKNOWN)) : (out << "<null>"));
2097 out << ", " << "JSON="; (__isset.JSON ? (out << to_string(JSON)) : (out << "<null>"));
2098 out << ", " << "BSON="; (__isset.BSON ? (out << to_string(BSON)) : (out << "<null>"));
2099 out << ")";
2100}
2101
2102
2103SchemaElement::~SchemaElement() throw() {
2104}
2105
2106
2107void SchemaElement::__set_type(const Type::type val) {
2108 this->type = val;
2109__isset.type = true;
2110}
2111
2112void SchemaElement::__set_type_length(const int32_t val) {
2113 this->type_length = val;
2114__isset.type_length = true;
2115}
2116
2117void SchemaElement::__set_repetition_type(const FieldRepetitionType::type val) {
2118 this->repetition_type = val;
2119__isset.repetition_type = true;
2120}
2121
2122void SchemaElement::__set_name(const std::string& val) {
2123 this->name = val;
2124}
2125
2126void SchemaElement::__set_num_children(const int32_t val) {
2127 this->num_children = val;
2128__isset.num_children = true;
2129}
2130
2131void SchemaElement::__set_converted_type(const ConvertedType::type val) {
2132 this->converted_type = val;
2133__isset.converted_type = true;
2134}
2135
2136void SchemaElement::__set_scale(const int32_t val) {
2137 this->scale = val;
2138__isset.scale = true;
2139}
2140
2141void SchemaElement::__set_precision(const int32_t val) {
2142 this->precision = val;
2143__isset.precision = true;
2144}
2145
2146void SchemaElement::__set_field_id(const int32_t val) {
2147 this->field_id = val;
2148__isset.field_id = true;
2149}
2150
2151void SchemaElement::__set_logicalType(const LogicalType& val) {
2152 this->logicalType = val;
2153__isset.logicalType = true;
2154}
2155std::ostream& operator<<(std::ostream& out, const SchemaElement& obj)
2156{
2157 obj.printTo(out);
2158 return out;
2159}
2160
2161
2162uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) {
2163
2164 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
2165 uint32_t xfer = 0;
2166 std::string fname;
2167 ::apache::thrift::protocol::TType ftype;
2168 int16_t fid;
2169
2170 xfer += iprot->readStructBegin(fname);
2171
2172 using ::apache::thrift::protocol::TProtocolException;
2173
2174 bool isset_name = false;
2175
2176 while (true)
2177 {
2178 xfer += iprot->readFieldBegin(fname, ftype, fid);
2179 if (ftype == ::apache::thrift::protocol::T_STOP) {
2180 break;
2181 }
2182 switch (fid)
2183 {
2184 case 1:
2185 if (ftype == ::apache::thrift::protocol::T_I32) {
2186 int32_t ecast36;
2187 xfer += iprot->readI32(ecast36);
2188 this->type = (Type::type)ecast36;
2189 this->__isset.type = true;
2190 } else {
2191 xfer += iprot->skip(ftype);
2192 }
2193 break;
2194 case 2:
2195 if (ftype == ::apache::thrift::protocol::T_I32) {
2196 xfer += iprot->readI32(this->type_length);
2197 this->__isset.type_length = true;
2198 } else {
2199 xfer += iprot->skip(ftype);
2200 }
2201 break;
2202 case 3:
2203 if (ftype == ::apache::thrift::protocol::T_I32) {
2204 int32_t ecast37;
2205 xfer += iprot->readI32(ecast37);
2206 this->repetition_type = (FieldRepetitionType::type)ecast37;
2207 this->__isset.repetition_type = true;
2208 } else {
2209 xfer += iprot->skip(ftype);
2210 }
2211 break;
2212 case 4:
2213 if (ftype == ::apache::thrift::protocol::T_STRING) {
2214 xfer += iprot->readString(this->name);
2215 isset_name = true;
2216 } else {
2217 xfer += iprot->skip(ftype);
2218 }
2219 break;
2220 case 5:
2221 if (ftype == ::apache::thrift::protocol::T_I32) {
2222 xfer += iprot->readI32(this->num_children);
2223 this->__isset.num_children = true;
2224 } else {
2225 xfer += iprot->skip(ftype);
2226 }
2227 break;
2228 case 6:
2229 if (ftype == ::apache::thrift::protocol::T_I32) {
2230 int32_t ecast38;
2231 xfer += iprot->readI32(ecast38);
2232 this->converted_type = (ConvertedType::type)ecast38;
2233 this->__isset.converted_type = true;
2234 } else {
2235 xfer += iprot->skip(ftype);
2236 }
2237 break;
2238 case 7:
2239 if (ftype == ::apache::thrift::protocol::T_I32) {
2240 xfer += iprot->readI32(this->scale);
2241 this->__isset.scale = true;
2242 } else {
2243 xfer += iprot->skip(ftype);
2244 }
2245 break;
2246 case 8:
2247 if (ftype == ::apache::thrift::protocol::T_I32) {
2248 xfer += iprot->readI32(this->precision);
2249 this->__isset.precision = true;
2250 } else {
2251 xfer += iprot->skip(ftype);
2252 }
2253 break;
2254 case 9:
2255 if (ftype == ::apache::thrift::protocol::T_I32) {
2256 xfer += iprot->readI32(this->field_id);
2257 this->__isset.field_id = true;
2258 } else {
2259 xfer += iprot->skip(ftype);
2260 }
2261 break;
2262 case 10:
2263 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
2264 xfer += this->logicalType.read(iprot);
2265 this->__isset.logicalType = true;
2266 } else {
2267 xfer += iprot->skip(ftype);
2268 }
2269 break;
2270 default:
2271 xfer += iprot->skip(ftype);
2272 break;
2273 }
2274 xfer += iprot->readFieldEnd();
2275 }
2276
2277 xfer += iprot->readStructEnd();
2278
2279 if (!isset_name)
2280 throw TProtocolException(TProtocolException::INVALID_DATA);
2281 return xfer;
2282}
2283
2284uint32_t SchemaElement::write(::apache::thrift::protocol::TProtocol* oprot) const {
2285 uint32_t xfer = 0;
2286 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
2287 xfer += oprot->writeStructBegin("SchemaElement");
2288
2289 if (this->__isset.type) {
2290 xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1);
2291 xfer += oprot->writeI32((int32_t)this->type);
2292 xfer += oprot->writeFieldEnd();
2293 }
2294 if (this->__isset.type_length) {
2295 xfer += oprot->writeFieldBegin("type_length", ::apache::thrift::protocol::T_I32, 2);
2296 xfer += oprot->writeI32(this->type_length);
2297 xfer += oprot->writeFieldEnd();
2298 }
2299 if (this->__isset.repetition_type) {
2300 xfer += oprot->writeFieldBegin("repetition_type", ::apache::thrift::protocol::T_I32, 3);
2301 xfer += oprot->writeI32((int32_t)this->repetition_type);
2302 xfer += oprot->writeFieldEnd();
2303 }
2304 xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 4);
2305 xfer += oprot->writeString(this->name);
2306 xfer += oprot->writeFieldEnd();
2307
2308 if (this->__isset.num_children) {
2309 xfer += oprot->writeFieldBegin("num_children", ::apache::thrift::protocol::T_I32, 5);
2310 xfer += oprot->writeI32(this->num_children);
2311 xfer += oprot->writeFieldEnd();
2312 }
2313 if (this->__isset.converted_type) {
2314 xfer += oprot->writeFieldBegin("converted_type", ::apache::thrift::protocol::T_I32, 6);
2315 xfer += oprot->writeI32((int32_t)this->converted_type);
2316 xfer += oprot->writeFieldEnd();
2317 }
2318 if (this->__isset.scale) {
2319 xfer += oprot->writeFieldBegin("scale", ::apache::thrift::protocol::T_I32, 7);
2320 xfer += oprot->writeI32(this->scale);
2321 xfer += oprot->writeFieldEnd();
2322 }
2323 if (this->__isset.precision) {
2324 xfer += oprot->writeFieldBegin("precision", ::apache::thrift::protocol::T_I32, 8);
2325 xfer += oprot->writeI32(this->precision);
2326 xfer += oprot->writeFieldEnd();
2327 }
2328 if (this->__isset.field_id) {
2329 xfer += oprot->writeFieldBegin("field_id", ::apache::thrift::protocol::T_I32, 9);
2330 xfer += oprot->writeI32(this->field_id);
2331 xfer += oprot->writeFieldEnd();
2332 }
2333 if (this->__isset.logicalType) {
2334 xfer += oprot->writeFieldBegin("logicalType", ::apache::thrift::protocol::T_STRUCT, 10);
2335 xfer += this->logicalType.write(oprot);
2336 xfer += oprot->writeFieldEnd();
2337 }
2338 xfer += oprot->writeFieldStop();
2339 xfer += oprot->writeStructEnd();
2340 return xfer;
2341}
2342
2343void swap(SchemaElement &a, SchemaElement &b) {
2344 using ::std::swap;
2345 swap(a.type, b.type);
2346 swap(a.type_length, b.type_length);
2347 swap(a.repetition_type, b.repetition_type);
2348 swap(a.name, b.name);
2349 swap(a.num_children, b.num_children);
2350 swap(a.converted_type, b.converted_type);
2351 swap(a.scale, b.scale);
2352 swap(a.precision, b.precision);
2353 swap(a.field_id, b.field_id);
2354 swap(a.logicalType, b.logicalType);
2355 swap(a.__isset, b.__isset);
2356}
2357
2358SchemaElement::SchemaElement(const SchemaElement& other39) {
2359 type = other39.type;
2360 type_length = other39.type_length;
2361 repetition_type = other39.repetition_type;
2362 name = other39.name;
2363 num_children = other39.num_children;
2364 converted_type = other39.converted_type;
2365 scale = other39.scale;
2366 precision = other39.precision;
2367 field_id = other39.field_id;
2368 logicalType = other39.logicalType;
2369 __isset = other39.__isset;
2370}
2371SchemaElement& SchemaElement::operator=(const SchemaElement& other40) {
2372 type = other40.type;
2373 type_length = other40.type_length;
2374 repetition_type = other40.repetition_type;
2375 name = other40.name;
2376 num_children = other40.num_children;
2377 converted_type = other40.converted_type;
2378 scale = other40.scale;
2379 precision = other40.precision;
2380 field_id = other40.field_id;
2381 logicalType = other40.logicalType;
2382 __isset = other40.__isset;
2383 return *this;
2384}
2385void SchemaElement::printTo(std::ostream& out) const {
2386 using ::apache::thrift::to_string;
2387 out << "SchemaElement(";
2388 out << "type="; (__isset.type ? (out << to_string(type)) : (out << "<null>"));
2389 out << ", " << "type_length="; (__isset.type_length ? (out << to_string(type_length)) : (out << "<null>"));
2390 out << ", " << "repetition_type="; (__isset.repetition_type ? (out << to_string(repetition_type)) : (out << "<null>"));
2391 out << ", " << "name=" << to_string(name);
2392 out << ", " << "num_children="; (__isset.num_children ? (out << to_string(num_children)) : (out << "<null>"));
2393 out << ", " << "converted_type="; (__isset.converted_type ? (out << to_string(converted_type)) : (out << "<null>"));
2394 out << ", " << "scale="; (__isset.scale ? (out << to_string(scale)) : (out << "<null>"));
2395 out << ", " << "precision="; (__isset.precision ? (out << to_string(precision)) : (out << "<null>"));
2396 out << ", " << "field_id="; (__isset.field_id ? (out << to_string(field_id)) : (out << "<null>"));
2397 out << ", " << "logicalType="; (__isset.logicalType ? (out << to_string(logicalType)) : (out << "<null>"));
2398 out << ")";
2399}
2400
2401
2402DataPageHeader::~DataPageHeader() throw() {
2403}
2404
2405
2406void DataPageHeader::__set_num_values(const int32_t val) {
2407 this->num_values = val;
2408}
2409
2410void DataPageHeader::__set_encoding(const Encoding::type val) {
2411 this->encoding = val;
2412}
2413
2414void DataPageHeader::__set_definition_level_encoding(const Encoding::type val) {
2415 this->definition_level_encoding = val;
2416}
2417
2418void DataPageHeader::__set_repetition_level_encoding(const Encoding::type val) {
2419 this->repetition_level_encoding = val;
2420}
2421
2422void DataPageHeader::__set_statistics(const Statistics& val) {
2423 this->statistics = val;
2424__isset.statistics = true;
2425}
2426std::ostream& operator<<(std::ostream& out, const DataPageHeader& obj)
2427{
2428 obj.printTo(out);
2429 return out;
2430}
2431
2432
2433uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
2434
2435 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
2436 uint32_t xfer = 0;
2437 std::string fname;
2438 ::apache::thrift::protocol::TType ftype;
2439 int16_t fid;
2440
2441 xfer += iprot->readStructBegin(fname);
2442
2443 using ::apache::thrift::protocol::TProtocolException;
2444
2445 bool isset_num_values = false;
2446 bool isset_encoding = false;
2447 bool isset_definition_level_encoding = false;
2448 bool isset_repetition_level_encoding = false;
2449
2450 while (true)
2451 {
2452 xfer += iprot->readFieldBegin(fname, ftype, fid);
2453 if (ftype == ::apache::thrift::protocol::T_STOP) {
2454 break;
2455 }
2456 switch (fid)
2457 {
2458 case 1:
2459 if (ftype == ::apache::thrift::protocol::T_I32) {
2460 xfer += iprot->readI32(this->num_values);
2461 isset_num_values = true;
2462 } else {
2463 xfer += iprot->skip(ftype);
2464 }
2465 break;
2466 case 2:
2467 if (ftype == ::apache::thrift::protocol::T_I32) {
2468 int32_t ecast41;
2469 xfer += iprot->readI32(ecast41);
2470 this->encoding = (Encoding::type)ecast41;
2471 isset_encoding = true;
2472 } else {
2473 xfer += iprot->skip(ftype);
2474 }
2475 break;
2476 case 3:
2477 if (ftype == ::apache::thrift::protocol::T_I32) {
2478 int32_t ecast42;
2479 xfer += iprot->readI32(ecast42);
2480 this->definition_level_encoding = (Encoding::type)ecast42;
2481 isset_definition_level_encoding = true;
2482 } else {
2483 xfer += iprot->skip(ftype);
2484 }
2485 break;
2486 case 4:
2487 if (ftype == ::apache::thrift::protocol::T_I32) {
2488 int32_t ecast43;
2489 xfer += iprot->readI32(ecast43);
2490 this->repetition_level_encoding = (Encoding::type)ecast43;
2491 isset_repetition_level_encoding = true;
2492 } else {
2493 xfer += iprot->skip(ftype);
2494 }
2495 break;
2496 case 5:
2497 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
2498 xfer += this->statistics.read(iprot);
2499 this->__isset.statistics = true;
2500 } else {
2501 xfer += iprot->skip(ftype);
2502 }
2503 break;
2504 default:
2505 xfer += iprot->skip(ftype);
2506 break;
2507 }
2508 xfer += iprot->readFieldEnd();
2509 }
2510
2511 xfer += iprot->readStructEnd();
2512
2513 if (!isset_num_values)
2514 throw TProtocolException(TProtocolException::INVALID_DATA);
2515 if (!isset_encoding)
2516 throw TProtocolException(TProtocolException::INVALID_DATA);
2517 if (!isset_definition_level_encoding)
2518 throw TProtocolException(TProtocolException::INVALID_DATA);
2519 if (!isset_repetition_level_encoding)
2520 throw TProtocolException(TProtocolException::INVALID_DATA);
2521 return xfer;
2522}
2523
2524uint32_t DataPageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const {
2525 uint32_t xfer = 0;
2526 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
2527 xfer += oprot->writeStructBegin("DataPageHeader");
2528
2529 xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I32, 1);
2530 xfer += oprot->writeI32(this->num_values);
2531 xfer += oprot->writeFieldEnd();
2532
2533 xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 2);
2534 xfer += oprot->writeI32((int32_t)this->encoding);
2535 xfer += oprot->writeFieldEnd();
2536
2537 xfer += oprot->writeFieldBegin("definition_level_encoding", ::apache::thrift::protocol::T_I32, 3);
2538 xfer += oprot->writeI32((int32_t)this->definition_level_encoding);
2539 xfer += oprot->writeFieldEnd();
2540
2541 xfer += oprot->writeFieldBegin("repetition_level_encoding", ::apache::thrift::protocol::T_I32, 4);
2542 xfer += oprot->writeI32((int32_t)this->repetition_level_encoding);
2543 xfer += oprot->writeFieldEnd();
2544
2545 if (this->__isset.statistics) {
2546 xfer += oprot->writeFieldBegin("statistics", ::apache::thrift::protocol::T_STRUCT, 5);
2547 xfer += this->statistics.write(oprot);
2548 xfer += oprot->writeFieldEnd();
2549 }
2550 xfer += oprot->writeFieldStop();
2551 xfer += oprot->writeStructEnd();
2552 return xfer;
2553}
2554
2555void swap(DataPageHeader &a, DataPageHeader &b) {
2556 using ::std::swap;
2557 swap(a.num_values, b.num_values);
2558 swap(a.encoding, b.encoding);
2559 swap(a.definition_level_encoding, b.definition_level_encoding);
2560 swap(a.repetition_level_encoding, b.repetition_level_encoding);
2561 swap(a.statistics, b.statistics);
2562 swap(a.__isset, b.__isset);
2563}
2564
2565DataPageHeader::DataPageHeader(const DataPageHeader& other44) {
2566 num_values = other44.num_values;
2567 encoding = other44.encoding;
2568 definition_level_encoding = other44.definition_level_encoding;
2569 repetition_level_encoding = other44.repetition_level_encoding;
2570 statistics = other44.statistics;
2571 __isset = other44.__isset;
2572}
2573DataPageHeader& DataPageHeader::operator=(const DataPageHeader& other45) {
2574 num_values = other45.num_values;
2575 encoding = other45.encoding;
2576 definition_level_encoding = other45.definition_level_encoding;
2577 repetition_level_encoding = other45.repetition_level_encoding;
2578 statistics = other45.statistics;
2579 __isset = other45.__isset;
2580 return *this;
2581}
2582void DataPageHeader::printTo(std::ostream& out) const {
2583 using ::apache::thrift::to_string;
2584 out << "DataPageHeader(";
2585 out << "num_values=" << to_string(num_values);
2586 out << ", " << "encoding=" << to_string(encoding);
2587 out << ", " << "definition_level_encoding=" << to_string(definition_level_encoding);
2588 out << ", " << "repetition_level_encoding=" << to_string(repetition_level_encoding);
2589 out << ", " << "statistics="; (__isset.statistics ? (out << to_string(statistics)) : (out << "<null>"));
2590 out << ")";
2591}
2592
2593
2594IndexPageHeader::~IndexPageHeader() throw() {
2595}
2596
2597std::ostream& operator<<(std::ostream& out, const IndexPageHeader& obj)
2598{
2599 obj.printTo(out);
2600 return out;
2601}
2602
2603
2604uint32_t IndexPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
2605
2606 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
2607 uint32_t xfer = 0;
2608 std::string fname;
2609 ::apache::thrift::protocol::TType ftype;
2610 int16_t fid;
2611
2612 xfer += iprot->readStructBegin(fname);
2613
2614 using ::apache::thrift::protocol::TProtocolException;
2615
2616
2617 while (true)
2618 {
2619 xfer += iprot->readFieldBegin(fname, ftype, fid);
2620 if (ftype == ::apache::thrift::protocol::T_STOP) {
2621 break;
2622 }
2623 xfer += iprot->skip(ftype);
2624 xfer += iprot->readFieldEnd();
2625 }
2626
2627 xfer += iprot->readStructEnd();
2628
2629 return xfer;
2630}
2631
2632uint32_t IndexPageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const {
2633 uint32_t xfer = 0;
2634 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
2635 xfer += oprot->writeStructBegin("IndexPageHeader");
2636
2637 xfer += oprot->writeFieldStop();
2638 xfer += oprot->writeStructEnd();
2639 return xfer;
2640}
2641
2642void swap(IndexPageHeader &a, IndexPageHeader &b) {
2643 using ::std::swap;
2644 (void) a;
2645 (void) b;
2646}
2647
2648IndexPageHeader::IndexPageHeader(const IndexPageHeader& other46) {
2649 (void) other46;
2650}
2651IndexPageHeader& IndexPageHeader::operator=(const IndexPageHeader& other47) {
2652 (void) other47;
2653 return *this;
2654}
2655void IndexPageHeader::printTo(std::ostream& out) const {
2656 using ::apache::thrift::to_string;
2657 out << "IndexPageHeader(";
2658 out << ")";
2659}
2660
2661
2662DictionaryPageHeader::~DictionaryPageHeader() throw() {
2663}
2664
2665
2666void DictionaryPageHeader::__set_num_values(const int32_t val) {
2667 this->num_values = val;
2668}
2669
2670void DictionaryPageHeader::__set_encoding(const Encoding::type val) {
2671 this->encoding = val;
2672}
2673
2674void DictionaryPageHeader::__set_is_sorted(const bool val) {
2675 this->is_sorted = val;
2676__isset.is_sorted = true;
2677}
2678std::ostream& operator<<(std::ostream& out, const DictionaryPageHeader& obj)
2679{
2680 obj.printTo(out);
2681 return out;
2682}
2683
2684
2685uint32_t DictionaryPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
2686
2687 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
2688 uint32_t xfer = 0;
2689 std::string fname;
2690 ::apache::thrift::protocol::TType ftype;
2691 int16_t fid;
2692
2693 xfer += iprot->readStructBegin(fname);
2694
2695 using ::apache::thrift::protocol::TProtocolException;
2696
2697 bool isset_num_values = false;
2698 bool isset_encoding = false;
2699
2700 while (true)
2701 {
2702 xfer += iprot->readFieldBegin(fname, ftype, fid);
2703 if (ftype == ::apache::thrift::protocol::T_STOP) {
2704 break;
2705 }
2706 switch (fid)
2707 {
2708 case 1:
2709 if (ftype == ::apache::thrift::protocol::T_I32) {
2710 xfer += iprot->readI32(this->num_values);
2711 isset_num_values = true;
2712 } else {
2713 xfer += iprot->skip(ftype);
2714 }
2715 break;
2716 case 2:
2717 if (ftype == ::apache::thrift::protocol::T_I32) {
2718 int32_t ecast48;
2719 xfer += iprot->readI32(ecast48);
2720 this->encoding = (Encoding::type)ecast48;
2721 isset_encoding = true;
2722 } else {
2723 xfer += iprot->skip(ftype);
2724 }
2725 break;
2726 case 3:
2727 if (ftype == ::apache::thrift::protocol::T_BOOL) {
2728 xfer += iprot->readBool(this->is_sorted);
2729 this->__isset.is_sorted = true;
2730 } else {
2731 xfer += iprot->skip(ftype);
2732 }
2733 break;
2734 default:
2735 xfer += iprot->skip(ftype);
2736 break;
2737 }
2738 xfer += iprot->readFieldEnd();
2739 }
2740
2741 xfer += iprot->readStructEnd();
2742
2743 if (!isset_num_values)
2744 throw TProtocolException(TProtocolException::INVALID_DATA);
2745 if (!isset_encoding)
2746 throw TProtocolException(TProtocolException::INVALID_DATA);
2747 return xfer;
2748}
2749
2750uint32_t DictionaryPageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const {
2751 uint32_t xfer = 0;
2752 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
2753 xfer += oprot->writeStructBegin("DictionaryPageHeader");
2754
2755 xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I32, 1);
2756 xfer += oprot->writeI32(this->num_values);
2757 xfer += oprot->writeFieldEnd();
2758
2759 xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 2);
2760 xfer += oprot->writeI32((int32_t)this->encoding);
2761 xfer += oprot->writeFieldEnd();
2762
2763 if (this->__isset.is_sorted) {
2764 xfer += oprot->writeFieldBegin("is_sorted", ::apache::thrift::protocol::T_BOOL, 3);
2765 xfer += oprot->writeBool(this->is_sorted);
2766 xfer += oprot->writeFieldEnd();
2767 }
2768 xfer += oprot->writeFieldStop();
2769 xfer += oprot->writeStructEnd();
2770 return xfer;
2771}
2772
2773void swap(DictionaryPageHeader &a, DictionaryPageHeader &b) {
2774 using ::std::swap;
2775 swap(a.num_values, b.num_values);
2776 swap(a.encoding, b.encoding);
2777 swap(a.is_sorted, b.is_sorted);
2778 swap(a.__isset, b.__isset);
2779}
2780
2781DictionaryPageHeader::DictionaryPageHeader(const DictionaryPageHeader& other49) {
2782 num_values = other49.num_values;
2783 encoding = other49.encoding;
2784 is_sorted = other49.is_sorted;
2785 __isset = other49.__isset;
2786}
2787DictionaryPageHeader& DictionaryPageHeader::operator=(const DictionaryPageHeader& other50) {
2788 num_values = other50.num_values;
2789 encoding = other50.encoding;
2790 is_sorted = other50.is_sorted;
2791 __isset = other50.__isset;
2792 return *this;
2793}
2794void DictionaryPageHeader::printTo(std::ostream& out) const {
2795 using ::apache::thrift::to_string;
2796 out << "DictionaryPageHeader(";
2797 out << "num_values=" << to_string(num_values);
2798 out << ", " << "encoding=" << to_string(encoding);
2799 out << ", " << "is_sorted="; (__isset.is_sorted ? (out << to_string(is_sorted)) : (out << "<null>"));
2800 out << ")";
2801}
2802
2803
2804DataPageHeaderV2::~DataPageHeaderV2() throw() {
2805}
2806
2807
2808void DataPageHeaderV2::__set_num_values(const int32_t val) {
2809 this->num_values = val;
2810}
2811
2812void DataPageHeaderV2::__set_num_nulls(const int32_t val) {
2813 this->num_nulls = val;
2814}
2815
2816void DataPageHeaderV2::__set_num_rows(const int32_t val) {
2817 this->num_rows = val;
2818}
2819
2820void DataPageHeaderV2::__set_encoding(const Encoding::type val) {
2821 this->encoding = val;
2822}
2823
2824void DataPageHeaderV2::__set_definition_levels_byte_length(const int32_t val) {
2825 this->definition_levels_byte_length = val;
2826}
2827
2828void DataPageHeaderV2::__set_repetition_levels_byte_length(const int32_t val) {
2829 this->repetition_levels_byte_length = val;
2830}
2831
2832void DataPageHeaderV2::__set_is_compressed(const bool val) {
2833 this->is_compressed = val;
2834__isset.is_compressed = true;
2835}
2836
2837void DataPageHeaderV2::__set_statistics(const Statistics& val) {
2838 this->statistics = val;
2839__isset.statistics = true;
2840}
2841std::ostream& operator<<(std::ostream& out, const DataPageHeaderV2& obj)
2842{
2843 obj.printTo(out);
2844 return out;
2845}
2846
2847
2848uint32_t DataPageHeaderV2::read(::apache::thrift::protocol::TProtocol* iprot) {
2849
2850 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
2851 uint32_t xfer = 0;
2852 std::string fname;
2853 ::apache::thrift::protocol::TType ftype;
2854 int16_t fid;
2855
2856 xfer += iprot->readStructBegin(fname);
2857
2858 using ::apache::thrift::protocol::TProtocolException;
2859
2860 bool isset_num_values = false;
2861 bool isset_num_nulls = false;
2862 bool isset_num_rows = false;
2863 bool isset_encoding = false;
2864 bool isset_definition_levels_byte_length = false;
2865 bool isset_repetition_levels_byte_length = false;
2866
2867 while (true)
2868 {
2869 xfer += iprot->readFieldBegin(fname, ftype, fid);
2870 if (ftype == ::apache::thrift::protocol::T_STOP) {
2871 break;
2872 }
2873 switch (fid)
2874 {
2875 case 1:
2876 if (ftype == ::apache::thrift::protocol::T_I32) {
2877 xfer += iprot->readI32(this->num_values);
2878 isset_num_values = true;
2879 } else {
2880 xfer += iprot->skip(ftype);
2881 }
2882 break;
2883 case 2:
2884 if (ftype == ::apache::thrift::protocol::T_I32) {
2885 xfer += iprot->readI32(this->num_nulls);
2886 isset_num_nulls = true;
2887 } else {
2888 xfer += iprot->skip(ftype);
2889 }
2890 break;
2891 case 3:
2892 if (ftype == ::apache::thrift::protocol::T_I32) {
2893 xfer += iprot->readI32(this->num_rows);
2894 isset_num_rows = true;
2895 } else {
2896 xfer += iprot->skip(ftype);
2897 }
2898 break;
2899 case 4:
2900 if (ftype == ::apache::thrift::protocol::T_I32) {
2901 int32_t ecast51;
2902 xfer += iprot->readI32(ecast51);
2903 this->encoding = (Encoding::type)ecast51;
2904 isset_encoding = true;
2905 } else {
2906 xfer += iprot->skip(ftype);
2907 }
2908 break;
2909 case 5:
2910 if (ftype == ::apache::thrift::protocol::T_I32) {
2911 xfer += iprot->readI32(this->definition_levels_byte_length);
2912 isset_definition_levels_byte_length = true;
2913 } else {
2914 xfer += iprot->skip(ftype);
2915 }
2916 break;
2917 case 6:
2918 if (ftype == ::apache::thrift::protocol::T_I32) {
2919 xfer += iprot->readI32(this->repetition_levels_byte_length);
2920 isset_repetition_levels_byte_length = true;
2921 } else {
2922 xfer += iprot->skip(ftype);
2923 }
2924 break;
2925 case 7:
2926 if (ftype == ::apache::thrift::protocol::T_BOOL) {
2927 xfer += iprot->readBool(this->is_compressed);
2928 this->__isset.is_compressed = true;
2929 } else {
2930 xfer += iprot->skip(ftype);
2931 }
2932 break;
2933 case 8:
2934 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
2935 xfer += this->statistics.read(iprot);
2936 this->__isset.statistics = true;
2937 } else {
2938 xfer += iprot->skip(ftype);
2939 }
2940 break;
2941 default:
2942 xfer += iprot->skip(ftype);
2943 break;
2944 }
2945 xfer += iprot->readFieldEnd();
2946 }
2947
2948 xfer += iprot->readStructEnd();
2949
2950 if (!isset_num_values)
2951 throw TProtocolException(TProtocolException::INVALID_DATA);
2952 if (!isset_num_nulls)
2953 throw TProtocolException(TProtocolException::INVALID_DATA);
2954 if (!isset_num_rows)
2955 throw TProtocolException(TProtocolException::INVALID_DATA);
2956 if (!isset_encoding)
2957 throw TProtocolException(TProtocolException::INVALID_DATA);
2958 if (!isset_definition_levels_byte_length)
2959 throw TProtocolException(TProtocolException::INVALID_DATA);
2960 if (!isset_repetition_levels_byte_length)
2961 throw TProtocolException(TProtocolException::INVALID_DATA);
2962 return xfer;
2963}
2964
2965uint32_t DataPageHeaderV2::write(::apache::thrift::protocol::TProtocol* oprot) const {
2966 uint32_t xfer = 0;
2967 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
2968 xfer += oprot->writeStructBegin("DataPageHeaderV2");
2969
2970 xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I32, 1);
2971 xfer += oprot->writeI32(this->num_values);
2972 xfer += oprot->writeFieldEnd();
2973
2974 xfer += oprot->writeFieldBegin("num_nulls", ::apache::thrift::protocol::T_I32, 2);
2975 xfer += oprot->writeI32(this->num_nulls);
2976 xfer += oprot->writeFieldEnd();
2977
2978 xfer += oprot->writeFieldBegin("num_rows", ::apache::thrift::protocol::T_I32, 3);
2979 xfer += oprot->writeI32(this->num_rows);
2980 xfer += oprot->writeFieldEnd();
2981
2982 xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 4);
2983 xfer += oprot->writeI32((int32_t)this->encoding);
2984 xfer += oprot->writeFieldEnd();
2985
2986 xfer += oprot->writeFieldBegin("definition_levels_byte_length", ::apache::thrift::protocol::T_I32, 5);
2987 xfer += oprot->writeI32(this->definition_levels_byte_length);
2988 xfer += oprot->writeFieldEnd();
2989
2990 xfer += oprot->writeFieldBegin("repetition_levels_byte_length", ::apache::thrift::protocol::T_I32, 6);
2991 xfer += oprot->writeI32(this->repetition_levels_byte_length);
2992 xfer += oprot->writeFieldEnd();
2993
2994 if (this->__isset.is_compressed) {
2995 xfer += oprot->writeFieldBegin("is_compressed", ::apache::thrift::protocol::T_BOOL, 7);
2996 xfer += oprot->writeBool(this->is_compressed);
2997 xfer += oprot->writeFieldEnd();
2998 }
2999 if (this->__isset.statistics) {
3000 xfer += oprot->writeFieldBegin("statistics", ::apache::thrift::protocol::T_STRUCT, 8);
3001 xfer += this->statistics.write(oprot);
3002 xfer += oprot->writeFieldEnd();
3003 }
3004 xfer += oprot->writeFieldStop();
3005 xfer += oprot->writeStructEnd();
3006 return xfer;
3007}
3008
3009void swap(DataPageHeaderV2 &a, DataPageHeaderV2 &b) {
3010 using ::std::swap;
3011 swap(a.num_values, b.num_values);
3012 swap(a.num_nulls, b.num_nulls);
3013 swap(a.num_rows, b.num_rows);
3014 swap(a.encoding, b.encoding);
3015 swap(a.definition_levels_byte_length, b.definition_levels_byte_length);
3016 swap(a.repetition_levels_byte_length, b.repetition_levels_byte_length);
3017 swap(a.is_compressed, b.is_compressed);
3018 swap(a.statistics, b.statistics);
3019 swap(a.__isset, b.__isset);
3020}
3021
3022DataPageHeaderV2::DataPageHeaderV2(const DataPageHeaderV2& other52) {
3023 num_values = other52.num_values;
3024 num_nulls = other52.num_nulls;
3025 num_rows = other52.num_rows;
3026 encoding = other52.encoding;
3027 definition_levels_byte_length = other52.definition_levels_byte_length;
3028 repetition_levels_byte_length = other52.repetition_levels_byte_length;
3029 is_compressed = other52.is_compressed;
3030 statistics = other52.statistics;
3031 __isset = other52.__isset;
3032}
3033DataPageHeaderV2& DataPageHeaderV2::operator=(const DataPageHeaderV2& other53) {
3034 num_values = other53.num_values;
3035 num_nulls = other53.num_nulls;
3036 num_rows = other53.num_rows;
3037 encoding = other53.encoding;
3038 definition_levels_byte_length = other53.definition_levels_byte_length;
3039 repetition_levels_byte_length = other53.repetition_levels_byte_length;
3040 is_compressed = other53.is_compressed;
3041 statistics = other53.statistics;
3042 __isset = other53.__isset;
3043 return *this;
3044}
3045void DataPageHeaderV2::printTo(std::ostream& out) const {
3046 using ::apache::thrift::to_string;
3047 out << "DataPageHeaderV2(";
3048 out << "num_values=" << to_string(num_values);
3049 out << ", " << "num_nulls=" << to_string(num_nulls);
3050 out << ", " << "num_rows=" << to_string(num_rows);
3051 out << ", " << "encoding=" << to_string(encoding);
3052 out << ", " << "definition_levels_byte_length=" << to_string(definition_levels_byte_length);
3053 out << ", " << "repetition_levels_byte_length=" << to_string(repetition_levels_byte_length);
3054 out << ", " << "is_compressed="; (__isset.is_compressed ? (out << to_string(is_compressed)) : (out << "<null>"));
3055 out << ", " << "statistics="; (__isset.statistics ? (out << to_string(statistics)) : (out << "<null>"));
3056 out << ")";
3057}
3058
3059
3060PageHeader::~PageHeader() throw() {
3061}
3062
3063
3064void PageHeader::__set_type(const PageType::type val) {
3065 this->type = val;
3066}
3067
3068void PageHeader::__set_uncompressed_page_size(const int32_t val) {
3069 this->uncompressed_page_size = val;
3070}
3071
3072void PageHeader::__set_compressed_page_size(const int32_t val) {
3073 this->compressed_page_size = val;
3074}
3075
3076void PageHeader::__set_crc(const int32_t val) {
3077 this->crc = val;
3078__isset.crc = true;
3079}
3080
3081void PageHeader::__set_data_page_header(const DataPageHeader& val) {
3082 this->data_page_header = val;
3083__isset.data_page_header = true;
3084}
3085
3086void PageHeader::__set_index_page_header(const IndexPageHeader& val) {
3087 this->index_page_header = val;
3088__isset.index_page_header = true;
3089}
3090
3091void PageHeader::__set_dictionary_page_header(const DictionaryPageHeader& val) {
3092 this->dictionary_page_header = val;
3093__isset.dictionary_page_header = true;
3094}
3095
3096void PageHeader::__set_data_page_header_v2(const DataPageHeaderV2& val) {
3097 this->data_page_header_v2 = val;
3098__isset.data_page_header_v2 = true;
3099}
3100std::ostream& operator<<(std::ostream& out, const PageHeader& obj)
3101{
3102 obj.printTo(out);
3103 return out;
3104}
3105
3106
3107uint32_t PageHeader::read(::apache::thrift::protocol::TProtocol* iprot) {
3108
3109 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
3110 uint32_t xfer = 0;
3111 std::string fname;
3112 ::apache::thrift::protocol::TType ftype;
3113 int16_t fid;
3114
3115 xfer += iprot->readStructBegin(fname);
3116
3117 using ::apache::thrift::protocol::TProtocolException;
3118
3119 bool isset_type = false;
3120 bool isset_uncompressed_page_size = false;
3121 bool isset_compressed_page_size = false;
3122
3123 while (true)
3124 {
3125 xfer += iprot->readFieldBegin(fname, ftype, fid);
3126 if (ftype == ::apache::thrift::protocol::T_STOP) {
3127 break;
3128 }
3129 switch (fid)
3130 {
3131 case 1:
3132 if (ftype == ::apache::thrift::protocol::T_I32) {
3133 int32_t ecast54;
3134 xfer += iprot->readI32(ecast54);
3135 this->type = (PageType::type)ecast54;
3136 isset_type = true;
3137 } else {
3138 xfer += iprot->skip(ftype);
3139 }
3140 break;
3141 case 2:
3142 if (ftype == ::apache::thrift::protocol::T_I32) {
3143 xfer += iprot->readI32(this->uncompressed_page_size);
3144 isset_uncompressed_page_size = true;
3145 } else {
3146 xfer += iprot->skip(ftype);
3147 }
3148 break;
3149 case 3:
3150 if (ftype == ::apache::thrift::protocol::T_I32) {
3151 xfer += iprot->readI32(this->compressed_page_size);
3152 isset_compressed_page_size = true;
3153 } else {
3154 xfer += iprot->skip(ftype);
3155 }
3156 break;
3157 case 4:
3158 if (ftype == ::apache::thrift::protocol::T_I32) {
3159 xfer += iprot->readI32(this->crc);
3160 this->__isset.crc = true;
3161 } else {
3162 xfer += iprot->skip(ftype);
3163 }
3164 break;
3165 case 5:
3166 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
3167 xfer += this->data_page_header.read(iprot);
3168 this->__isset.data_page_header = true;
3169 } else {
3170 xfer += iprot->skip(ftype);
3171 }
3172 break;
3173 case 6:
3174 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
3175 xfer += this->index_page_header.read(iprot);
3176 this->__isset.index_page_header = true;
3177 } else {
3178 xfer += iprot->skip(ftype);
3179 }
3180 break;
3181 case 7:
3182 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
3183 xfer += this->dictionary_page_header.read(iprot);
3184 this->__isset.dictionary_page_header = true;
3185 } else {
3186 xfer += iprot->skip(ftype);
3187 }
3188 break;
3189 case 8:
3190 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
3191 xfer += this->data_page_header_v2.read(iprot);
3192 this->__isset.data_page_header_v2 = true;
3193 } else {
3194 xfer += iprot->skip(ftype);
3195 }
3196 break;
3197 default:
3198 xfer += iprot->skip(ftype);
3199 break;
3200 }
3201 xfer += iprot->readFieldEnd();
3202 }
3203
3204 xfer += iprot->readStructEnd();
3205
3206 if (!isset_type)
3207 throw TProtocolException(TProtocolException::INVALID_DATA);
3208 if (!isset_uncompressed_page_size)
3209 throw TProtocolException(TProtocolException::INVALID_DATA);
3210 if (!isset_compressed_page_size)
3211 throw TProtocolException(TProtocolException::INVALID_DATA);
3212 return xfer;
3213}
3214
3215uint32_t PageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const {
3216 uint32_t xfer = 0;
3217 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
3218 xfer += oprot->writeStructBegin("PageHeader");
3219
3220 xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1);
3221 xfer += oprot->writeI32((int32_t)this->type);
3222 xfer += oprot->writeFieldEnd();
3223
3224 xfer += oprot->writeFieldBegin("uncompressed_page_size", ::apache::thrift::protocol::T_I32, 2);
3225 xfer += oprot->writeI32(this->uncompressed_page_size);
3226 xfer += oprot->writeFieldEnd();
3227
3228 xfer += oprot->writeFieldBegin("compressed_page_size", ::apache::thrift::protocol::T_I32, 3);
3229 xfer += oprot->writeI32(this->compressed_page_size);
3230 xfer += oprot->writeFieldEnd();
3231
3232 if (this->__isset.crc) {
3233 xfer += oprot->writeFieldBegin("crc", ::apache::thrift::protocol::T_I32, 4);
3234 xfer += oprot->writeI32(this->crc);
3235 xfer += oprot->writeFieldEnd();
3236 }
3237 if (this->__isset.data_page_header) {
3238 xfer += oprot->writeFieldBegin("data_page_header", ::apache::thrift::protocol::T_STRUCT, 5);
3239 xfer += this->data_page_header.write(oprot);
3240 xfer += oprot->writeFieldEnd();
3241 }
3242 if (this->__isset.index_page_header) {
3243 xfer += oprot->writeFieldBegin("index_page_header", ::apache::thrift::protocol::T_STRUCT, 6);
3244 xfer += this->index_page_header.write(oprot);
3245 xfer += oprot->writeFieldEnd();
3246 }
3247 if (this->__isset.dictionary_page_header) {
3248 xfer += oprot->writeFieldBegin("dictionary_page_header", ::apache::thrift::protocol::T_STRUCT, 7);
3249 xfer += this->dictionary_page_header.write(oprot);
3250 xfer += oprot->writeFieldEnd();
3251 }
3252 if (this->__isset.data_page_header_v2) {
3253 xfer += oprot->writeFieldBegin("data_page_header_v2", ::apache::thrift::protocol::T_STRUCT, 8);
3254 xfer += this->data_page_header_v2.write(oprot);
3255 xfer += oprot->writeFieldEnd();
3256 }
3257 xfer += oprot->writeFieldStop();
3258 xfer += oprot->writeStructEnd();
3259 return xfer;
3260}
3261
3262void swap(PageHeader &a, PageHeader &b) {
3263 using ::std::swap;
3264 swap(a.type, b.type);
3265 swap(a.uncompressed_page_size, b.uncompressed_page_size);
3266 swap(a.compressed_page_size, b.compressed_page_size);
3267 swap(a.crc, b.crc);
3268 swap(a.data_page_header, b.data_page_header);
3269 swap(a.index_page_header, b.index_page_header);
3270 swap(a.dictionary_page_header, b.dictionary_page_header);
3271 swap(a.data_page_header_v2, b.data_page_header_v2);
3272 swap(a.__isset, b.__isset);
3273}
3274
3275PageHeader::PageHeader(const PageHeader& other55) {
3276 type = other55.type;
3277 uncompressed_page_size = other55.uncompressed_page_size;
3278 compressed_page_size = other55.compressed_page_size;
3279 crc = other55.crc;
3280 data_page_header = other55.data_page_header;
3281 index_page_header = other55.index_page_header;
3282 dictionary_page_header = other55.dictionary_page_header;
3283 data_page_header_v2 = other55.data_page_header_v2;
3284 __isset = other55.__isset;
3285}
3286PageHeader& PageHeader::operator=(const PageHeader& other56) {
3287 type = other56.type;
3288 uncompressed_page_size = other56.uncompressed_page_size;
3289 compressed_page_size = other56.compressed_page_size;
3290 crc = other56.crc;
3291 data_page_header = other56.data_page_header;
3292 index_page_header = other56.index_page_header;
3293 dictionary_page_header = other56.dictionary_page_header;
3294 data_page_header_v2 = other56.data_page_header_v2;
3295 __isset = other56.__isset;
3296 return *this;
3297}
3298void PageHeader::printTo(std::ostream& out) const {
3299 using ::apache::thrift::to_string;
3300 out << "PageHeader(";
3301 out << "type=" << to_string(type);
3302 out << ", " << "uncompressed_page_size=" << to_string(uncompressed_page_size);
3303 out << ", " << "compressed_page_size=" << to_string(compressed_page_size);
3304 out << ", " << "crc="; (__isset.crc ? (out << to_string(crc)) : (out << "<null>"));
3305 out << ", " << "data_page_header="; (__isset.data_page_header ? (out << to_string(data_page_header)) : (out << "<null>"));
3306 out << ", " << "index_page_header="; (__isset.index_page_header ? (out << to_string(index_page_header)) : (out << "<null>"));
3307 out << ", " << "dictionary_page_header="; (__isset.dictionary_page_header ? (out << to_string(dictionary_page_header)) : (out << "<null>"));
3308 out << ", " << "data_page_header_v2="; (__isset.data_page_header_v2 ? (out << to_string(data_page_header_v2)) : (out << "<null>"));
3309 out << ")";
3310}
3311
3312
3313KeyValue::~KeyValue() throw() {
3314}
3315
3316
3317void KeyValue::__set_key(const std::string& val) {
3318 this->key = val;
3319}
3320
3321void KeyValue::__set_value(const std::string& val) {
3322 this->value = val;
3323__isset.value = true;
3324}
3325std::ostream& operator<<(std::ostream& out, const KeyValue& obj)
3326{
3327 obj.printTo(out);
3328 return out;
3329}
3330
3331
3332uint32_t KeyValue::read(::apache::thrift::protocol::TProtocol* iprot) {
3333
3334 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
3335 uint32_t xfer = 0;
3336 std::string fname;
3337 ::apache::thrift::protocol::TType ftype;
3338 int16_t fid;
3339
3340 xfer += iprot->readStructBegin(fname);
3341
3342 using ::apache::thrift::protocol::TProtocolException;
3343
3344 bool isset_key = false;
3345
3346 while (true)
3347 {
3348 xfer += iprot->readFieldBegin(fname, ftype, fid);
3349 if (ftype == ::apache::thrift::protocol::T_STOP) {
3350 break;
3351 }
3352 switch (fid)
3353 {
3354 case 1:
3355 if (ftype == ::apache::thrift::protocol::T_STRING) {
3356 xfer += iprot->readString(this->key);
3357 isset_key = true;
3358 } else {
3359 xfer += iprot->skip(ftype);
3360 }
3361 break;
3362 case 2:
3363 if (ftype == ::apache::thrift::protocol::T_STRING) {
3364 xfer += iprot->readString(this->value);
3365 this->__isset.value = true;
3366 } else {
3367 xfer += iprot->skip(ftype);
3368 }
3369 break;
3370 default:
3371 xfer += iprot->skip(ftype);
3372 break;
3373 }
3374 xfer += iprot->readFieldEnd();
3375 }
3376
3377 xfer += iprot->readStructEnd();
3378
3379 if (!isset_key)
3380 throw TProtocolException(TProtocolException::INVALID_DATA);
3381 return xfer;
3382}
3383
3384uint32_t KeyValue::write(::apache::thrift::protocol::TProtocol* oprot) const {
3385 uint32_t xfer = 0;
3386 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
3387 xfer += oprot->writeStructBegin("KeyValue");
3388
3389 xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1);
3390 xfer += oprot->writeString(this->key);
3391 xfer += oprot->writeFieldEnd();
3392
3393 if (this->__isset.value) {
3394 xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2);
3395 xfer += oprot->writeString(this->value);
3396 xfer += oprot->writeFieldEnd();
3397 }
3398 xfer += oprot->writeFieldStop();
3399 xfer += oprot->writeStructEnd();
3400 return xfer;
3401}
3402
3403void swap(KeyValue &a, KeyValue &b) {
3404 using ::std::swap;
3405 swap(a.key, b.key);
3406 swap(a.value, b.value);
3407 swap(a.__isset, b.__isset);
3408}
3409
3410KeyValue::KeyValue(const KeyValue& other57) {
3411 key = other57.key;
3412 value = other57.value;
3413 __isset = other57.__isset;
3414}
3415KeyValue& KeyValue::operator=(const KeyValue& other58) {
3416 key = other58.key;
3417 value = other58.value;
3418 __isset = other58.__isset;
3419 return *this;
3420}
3421void KeyValue::printTo(std::ostream& out) const {
3422 using ::apache::thrift::to_string;
3423 out << "KeyValue(";
3424 out << "key=" << to_string(key);
3425 out << ", " << "value="; (__isset.value ? (out << to_string(value)) : (out << "<null>"));
3426 out << ")";
3427}
3428
3429
3430SortingColumn::~SortingColumn() throw() {
3431}
3432
3433
3434void SortingColumn::__set_column_idx(const int32_t val) {
3435 this->column_idx = val;
3436}
3437
3438void SortingColumn::__set_descending(const bool val) {
3439 this->descending = val;
3440}
3441
3442void SortingColumn::__set_nulls_first(const bool val) {
3443 this->nulls_first = val;
3444}
3445std::ostream& operator<<(std::ostream& out, const SortingColumn& obj)
3446{
3447 obj.printTo(out);
3448 return out;
3449}
3450
3451
3452uint32_t SortingColumn::read(::apache::thrift::protocol::TProtocol* iprot) {
3453
3454 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
3455 uint32_t xfer = 0;
3456 std::string fname;
3457 ::apache::thrift::protocol::TType ftype;
3458 int16_t fid;
3459
3460 xfer += iprot->readStructBegin(fname);
3461
3462 using ::apache::thrift::protocol::TProtocolException;
3463
3464 bool isset_column_idx = false;
3465 bool isset_descending = false;
3466 bool isset_nulls_first = false;
3467
3468 while (true)
3469 {
3470 xfer += iprot->readFieldBegin(fname, ftype, fid);
3471 if (ftype == ::apache::thrift::protocol::T_STOP) {
3472 break;
3473 }
3474 switch (fid)
3475 {
3476 case 1:
3477 if (ftype == ::apache::thrift::protocol::T_I32) {
3478 xfer += iprot->readI32(this->column_idx);
3479 isset_column_idx = true;
3480 } else {
3481 xfer += iprot->skip(ftype);
3482 }
3483 break;
3484 case 2:
3485 if (ftype == ::apache::thrift::protocol::T_BOOL) {
3486 xfer += iprot->readBool(this->descending);
3487 isset_descending = true;
3488 } else {
3489 xfer += iprot->skip(ftype);
3490 }
3491 break;
3492 case 3:
3493 if (ftype == ::apache::thrift::protocol::T_BOOL) {
3494 xfer += iprot->readBool(this->nulls_first);
3495 isset_nulls_first = true;
3496 } else {
3497 xfer += iprot->skip(ftype);
3498 }
3499 break;
3500 default:
3501 xfer += iprot->skip(ftype);
3502 break;
3503 }
3504 xfer += iprot->readFieldEnd();
3505 }
3506
3507 xfer += iprot->readStructEnd();
3508
3509 if (!isset_column_idx)
3510 throw TProtocolException(TProtocolException::INVALID_DATA);
3511 if (!isset_descending)
3512 throw TProtocolException(TProtocolException::INVALID_DATA);
3513 if (!isset_nulls_first)
3514 throw TProtocolException(TProtocolException::INVALID_DATA);
3515 return xfer;
3516}
3517
3518uint32_t SortingColumn::write(::apache::thrift::protocol::TProtocol* oprot) const {
3519 uint32_t xfer = 0;
3520 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
3521 xfer += oprot->writeStructBegin("SortingColumn");
3522
3523 xfer += oprot->writeFieldBegin("column_idx", ::apache::thrift::protocol::T_I32, 1);
3524 xfer += oprot->writeI32(this->column_idx);
3525 xfer += oprot->writeFieldEnd();
3526
3527 xfer += oprot->writeFieldBegin("descending", ::apache::thrift::protocol::T_BOOL, 2);
3528 xfer += oprot->writeBool(this->descending);
3529 xfer += oprot->writeFieldEnd();
3530
3531 xfer += oprot->writeFieldBegin("nulls_first", ::apache::thrift::protocol::T_BOOL, 3);
3532 xfer += oprot->writeBool(this->nulls_first);
3533 xfer += oprot->writeFieldEnd();
3534
3535 xfer += oprot->writeFieldStop();
3536 xfer += oprot->writeStructEnd();
3537 return xfer;
3538}
3539
3540void swap(SortingColumn &a, SortingColumn &b) {
3541 using ::std::swap;
3542 swap(a.column_idx, b.column_idx);
3543 swap(a.descending, b.descending);
3544 swap(a.nulls_first, b.nulls_first);
3545}
3546
3547SortingColumn::SortingColumn(const SortingColumn& other59) {
3548 column_idx = other59.column_idx;
3549 descending = other59.descending;
3550 nulls_first = other59.nulls_first;
3551}
3552SortingColumn& SortingColumn::operator=(const SortingColumn& other60) {
3553 column_idx = other60.column_idx;
3554 descending = other60.descending;
3555 nulls_first = other60.nulls_first;
3556 return *this;
3557}
3558void SortingColumn::printTo(std::ostream& out) const {
3559 using ::apache::thrift::to_string;
3560 out << "SortingColumn(";
3561 out << "column_idx=" << to_string(column_idx);
3562 out << ", " << "descending=" << to_string(descending);
3563 out << ", " << "nulls_first=" << to_string(nulls_first);
3564 out << ")";
3565}
3566
3567
3568PageEncodingStats::~PageEncodingStats() throw() {
3569}
3570
3571
3572void PageEncodingStats::__set_page_type(const PageType::type val) {
3573 this->page_type = val;
3574}
3575
3576void PageEncodingStats::__set_encoding(const Encoding::type val) {
3577 this->encoding = val;
3578}
3579
3580void PageEncodingStats::__set_count(const int32_t val) {
3581 this->count = val;
3582}
3583std::ostream& operator<<(std::ostream& out, const PageEncodingStats& obj)
3584{
3585 obj.printTo(out);
3586 return out;
3587}
3588
3589
3590uint32_t PageEncodingStats::read(::apache::thrift::protocol::TProtocol* iprot) {
3591
3592 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
3593 uint32_t xfer = 0;
3594 std::string fname;
3595 ::apache::thrift::protocol::TType ftype;
3596 int16_t fid;
3597
3598 xfer += iprot->readStructBegin(fname);
3599
3600 using ::apache::thrift::protocol::TProtocolException;
3601
3602 bool isset_page_type = false;
3603 bool isset_encoding = false;
3604 bool isset_count = false;
3605
3606 while (true)
3607 {
3608 xfer += iprot->readFieldBegin(fname, ftype, fid);
3609 if (ftype == ::apache::thrift::protocol::T_STOP) {
3610 break;
3611 }
3612 switch (fid)
3613 {
3614 case 1:
3615 if (ftype == ::apache::thrift::protocol::T_I32) {
3616 int32_t ecast61;
3617 xfer += iprot->readI32(ecast61);
3618 this->page_type = (PageType::type)ecast61;
3619 isset_page_type = true;
3620 } else {
3621 xfer += iprot->skip(ftype);
3622 }
3623 break;
3624 case 2:
3625 if (ftype == ::apache::thrift::protocol::T_I32) {
3626 int32_t ecast62;
3627 xfer += iprot->readI32(ecast62);
3628 this->encoding = (Encoding::type)ecast62;
3629 isset_encoding = true;
3630 } else {
3631 xfer += iprot->skip(ftype);
3632 }
3633 break;
3634 case 3:
3635 if (ftype == ::apache::thrift::protocol::T_I32) {
3636 xfer += iprot->readI32(this->count);
3637 isset_count = true;
3638 } else {
3639 xfer += iprot->skip(ftype);
3640 }
3641 break;
3642 default:
3643 xfer += iprot->skip(ftype);
3644 break;
3645 }
3646 xfer += iprot->readFieldEnd();
3647 }
3648
3649 xfer += iprot->readStructEnd();
3650
3651 if (!isset_page_type)
3652 throw TProtocolException(TProtocolException::INVALID_DATA);
3653 if (!isset_encoding)
3654 throw TProtocolException(TProtocolException::INVALID_DATA);
3655 if (!isset_count)
3656 throw TProtocolException(TProtocolException::INVALID_DATA);
3657 return xfer;
3658}
3659
3660uint32_t PageEncodingStats::write(::apache::thrift::protocol::TProtocol* oprot) const {
3661 uint32_t xfer = 0;
3662 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
3663 xfer += oprot->writeStructBegin("PageEncodingStats");
3664
3665 xfer += oprot->writeFieldBegin("page_type", ::apache::thrift::protocol::T_I32, 1);
3666 xfer += oprot->writeI32((int32_t)this->page_type);
3667 xfer += oprot->writeFieldEnd();
3668
3669 xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 2);
3670 xfer += oprot->writeI32((int32_t)this->encoding);
3671 xfer += oprot->writeFieldEnd();
3672
3673 xfer += oprot->writeFieldBegin("count", ::apache::thrift::protocol::T_I32, 3);
3674 xfer += oprot->writeI32(this->count);
3675 xfer += oprot->writeFieldEnd();
3676
3677 xfer += oprot->writeFieldStop();
3678 xfer += oprot->writeStructEnd();
3679 return xfer;
3680}
3681
3682void swap(PageEncodingStats &a, PageEncodingStats &b) {
3683 using ::std::swap;
3684 swap(a.page_type, b.page_type);
3685 swap(a.encoding, b.encoding);
3686 swap(a.count, b.count);
3687}
3688
3689PageEncodingStats::PageEncodingStats(const PageEncodingStats& other63) {
3690 page_type = other63.page_type;
3691 encoding = other63.encoding;
3692 count = other63.count;
3693}
3694PageEncodingStats& PageEncodingStats::operator=(const PageEncodingStats& other64) {
3695 page_type = other64.page_type;
3696 encoding = other64.encoding;
3697 count = other64.count;
3698 return *this;
3699}
3700void PageEncodingStats::printTo(std::ostream& out) const {
3701 using ::apache::thrift::to_string;
3702 out << "PageEncodingStats(";
3703 out << "page_type=" << to_string(page_type);
3704 out << ", " << "encoding=" << to_string(encoding);
3705 out << ", " << "count=" << to_string(count);
3706 out << ")";
3707}
3708
3709
3710ColumnMetaData::~ColumnMetaData() throw() {
3711}
3712
3713
3714void ColumnMetaData::__set_type(const Type::type val) {
3715 this->type = val;
3716}
3717
3718void ColumnMetaData::__set_encodings(const std::vector<Encoding::type> & val) {
3719 this->encodings = val;
3720}
3721
3722void ColumnMetaData::__set_path_in_schema(const std::vector<std::string> & val) {
3723 this->path_in_schema = val;
3724}
3725
3726void ColumnMetaData::__set_codec(const CompressionCodec::type val) {
3727 this->codec = val;
3728}
3729
3730void ColumnMetaData::__set_num_values(const int64_t val) {
3731 this->num_values = val;
3732}
3733
3734void ColumnMetaData::__set_total_uncompressed_size(const int64_t val) {
3735 this->total_uncompressed_size = val;
3736}
3737
3738void ColumnMetaData::__set_total_compressed_size(const int64_t val) {
3739 this->total_compressed_size = val;
3740}
3741
3742void ColumnMetaData::__set_key_value_metadata(const std::vector<KeyValue> & val) {
3743 this->key_value_metadata = val;
3744__isset.key_value_metadata = true;
3745}
3746
3747void ColumnMetaData::__set_data_page_offset(const int64_t val) {
3748 this->data_page_offset = val;
3749}
3750
3751void ColumnMetaData::__set_index_page_offset(const int64_t val) {
3752 this->index_page_offset = val;
3753__isset.index_page_offset = true;
3754}
3755
3756void ColumnMetaData::__set_dictionary_page_offset(const int64_t val) {
3757 this->dictionary_page_offset = val;
3758__isset.dictionary_page_offset = true;
3759}
3760
3761void ColumnMetaData::__set_statistics(const Statistics& val) {
3762 this->statistics = val;
3763__isset.statistics = true;
3764}
3765
3766void ColumnMetaData::__set_encoding_stats(const std::vector<PageEncodingStats> & val) {
3767 this->encoding_stats = val;
3768__isset.encoding_stats = true;
3769}
3770std::ostream& operator<<(std::ostream& out, const ColumnMetaData& obj)
3771{
3772 obj.printTo(out);
3773 return out;
3774}
3775
3776
3777uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) {
3778
3779 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
3780 uint32_t xfer = 0;
3781 std::string fname;
3782 ::apache::thrift::protocol::TType ftype;
3783 int16_t fid;
3784
3785 xfer += iprot->readStructBegin(fname);
3786
3787 using ::apache::thrift::protocol::TProtocolException;
3788
3789 bool isset_type = false;
3790 bool isset_encodings = false;
3791 bool isset_path_in_schema = false;
3792 bool isset_codec = false;
3793 bool isset_num_values = false;
3794 bool isset_total_uncompressed_size = false;
3795 bool isset_total_compressed_size = false;
3796 bool isset_data_page_offset = false;
3797
3798 while (true)
3799 {
3800 xfer += iprot->readFieldBegin(fname, ftype, fid);
3801 if (ftype == ::apache::thrift::protocol::T_STOP) {
3802 break;
3803 }
3804 switch (fid)
3805 {
3806 case 1:
3807 if (ftype == ::apache::thrift::protocol::T_I32) {
3808 int32_t ecast65;
3809 xfer += iprot->readI32(ecast65);
3810 this->type = (Type::type)ecast65;
3811 isset_type = true;
3812 } else {
3813 xfer += iprot->skip(ftype);
3814 }
3815 break;
3816 case 2:
3817 if (ftype == ::apache::thrift::protocol::T_LIST) {
3818 {
3819 this->encodings.clear();
3820 uint32_t _size66;
3821 ::apache::thrift::protocol::TType _etype69;
3822 xfer += iprot->readListBegin(_etype69, _size66);
3823 this->encodings.resize(_size66);
3824 uint32_t _i70;
3825 for (_i70 = 0; _i70 < _size66; ++_i70)
3826 {
3827 int32_t ecast71;
3828 xfer += iprot->readI32(ecast71);
3829 this->encodings[_i70] = (Encoding::type)ecast71;
3830 }
3831 xfer += iprot->readListEnd();
3832 }
3833 isset_encodings = true;
3834 } else {
3835 xfer += iprot->skip(ftype);
3836 }
3837 break;
3838 case 3:
3839 if (ftype == ::apache::thrift::protocol::T_LIST) {
3840 {
3841 this->path_in_schema.clear();
3842 uint32_t _size72;
3843 ::apache::thrift::protocol::TType _etype75;
3844 xfer += iprot->readListBegin(_etype75, _size72);
3845 this->path_in_schema.resize(_size72);
3846 uint32_t _i76;
3847 for (_i76 = 0; _i76 < _size72; ++_i76)
3848 {
3849 xfer += iprot->readString(this->path_in_schema[_i76]);
3850 }
3851 xfer += iprot->readListEnd();
3852 }
3853 isset_path_in_schema = true;
3854 } else {
3855 xfer += iprot->skip(ftype);
3856 }
3857 break;
3858 case 4:
3859 if (ftype == ::apache::thrift::protocol::T_I32) {
3860 int32_t ecast77;
3861 xfer += iprot->readI32(ecast77);
3862 this->codec = (CompressionCodec::type)ecast77;
3863 isset_codec = true;
3864 } else {
3865 xfer += iprot->skip(ftype);
3866 }
3867 break;
3868 case 5:
3869 if (ftype == ::apache::thrift::protocol::T_I64) {
3870 xfer += iprot->readI64(this->num_values);
3871 isset_num_values = true;
3872 } else {
3873 xfer += iprot->skip(ftype);
3874 }
3875 break;
3876 case 6:
3877 if (ftype == ::apache::thrift::protocol::T_I64) {
3878 xfer += iprot->readI64(this->total_uncompressed_size);
3879 isset_total_uncompressed_size = true;
3880 } else {
3881 xfer += iprot->skip(ftype);
3882 }
3883 break;
3884 case 7:
3885 if (ftype == ::apache::thrift::protocol::T_I64) {
3886 xfer += iprot->readI64(this->total_compressed_size);
3887 isset_total_compressed_size = true;
3888 } else {
3889 xfer += iprot->skip(ftype);
3890 }
3891 break;
3892 case 8:
3893 if (ftype == ::apache::thrift::protocol::T_LIST) {
3894 {
3895 this->key_value_metadata.clear();
3896 uint32_t _size78;
3897 ::apache::thrift::protocol::TType _etype81;
3898 xfer += iprot->readListBegin(_etype81, _size78);
3899 this->key_value_metadata.resize(_size78);
3900 uint32_t _i82;
3901 for (_i82 = 0; _i82 < _size78; ++_i82)
3902 {
3903 xfer += this->key_value_metadata[_i82].read(iprot);
3904 }
3905 xfer += iprot->readListEnd();
3906 }
3907 this->__isset.key_value_metadata = true;
3908 } else {
3909 xfer += iprot->skip(ftype);
3910 }
3911 break;
3912 case 9:
3913 if (ftype == ::apache::thrift::protocol::T_I64) {
3914 xfer += iprot->readI64(this->data_page_offset);
3915 isset_data_page_offset = true;
3916 } else {
3917 xfer += iprot->skip(ftype);
3918 }
3919 break;
3920 case 10:
3921 if (ftype == ::apache::thrift::protocol::T_I64) {
3922 xfer += iprot->readI64(this->index_page_offset);
3923 this->__isset.index_page_offset = true;
3924 } else {
3925 xfer += iprot->skip(ftype);
3926 }
3927 break;
3928 case 11:
3929 if (ftype == ::apache::thrift::protocol::T_I64) {
3930 xfer += iprot->readI64(this->dictionary_page_offset);
3931 this->__isset.dictionary_page_offset = true;
3932 } else {
3933 xfer += iprot->skip(ftype);
3934 }
3935 break;
3936 case 12:
3937 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
3938 xfer += this->statistics.read(iprot);
3939 this->__isset.statistics = true;
3940 } else {
3941 xfer += iprot->skip(ftype);
3942 }
3943 break;
3944 case 13:
3945 if (ftype == ::apache::thrift::protocol::T_LIST) {
3946 {
3947 this->encoding_stats.clear();
3948 uint32_t _size83;
3949 ::apache::thrift::protocol::TType _etype86;
3950 xfer += iprot->readListBegin(_etype86, _size83);
3951 this->encoding_stats.resize(_size83);
3952 uint32_t _i87;
3953 for (_i87 = 0; _i87 < _size83; ++_i87)
3954 {
3955 xfer += this->encoding_stats[_i87].read(iprot);
3956 }
3957 xfer += iprot->readListEnd();
3958 }
3959 this->__isset.encoding_stats = true;
3960 } else {
3961 xfer += iprot->skip(ftype);
3962 }
3963 break;
3964 default:
3965 xfer += iprot->skip(ftype);
3966 break;
3967 }
3968 xfer += iprot->readFieldEnd();
3969 }
3970
3971 xfer += iprot->readStructEnd();
3972
3973 if (!isset_type)
3974 throw TProtocolException(TProtocolException::INVALID_DATA);
3975 if (!isset_encodings)
3976 throw TProtocolException(TProtocolException::INVALID_DATA);
3977 if (!isset_path_in_schema)
3978 throw TProtocolException(TProtocolException::INVALID_DATA);
3979 if (!isset_codec)
3980 throw TProtocolException(TProtocolException::INVALID_DATA);
3981 if (!isset_num_values)
3982 throw TProtocolException(TProtocolException::INVALID_DATA);
3983 if (!isset_total_uncompressed_size)
3984 throw TProtocolException(TProtocolException::INVALID_DATA);
3985 if (!isset_total_compressed_size)
3986 throw TProtocolException(TProtocolException::INVALID_DATA);
3987 if (!isset_data_page_offset)
3988 throw TProtocolException(TProtocolException::INVALID_DATA);
3989 return xfer;
3990}
3991
3992uint32_t ColumnMetaData::write(::apache::thrift::protocol::TProtocol* oprot) const {
3993 uint32_t xfer = 0;
3994 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
3995 xfer += oprot->writeStructBegin("ColumnMetaData");
3996
3997 xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1);
3998 xfer += oprot->writeI32((int32_t)this->type);
3999 xfer += oprot->writeFieldEnd();
4000
4001 xfer += oprot->writeFieldBegin("encodings", ::apache::thrift::protocol::T_LIST, 2);
4002 {
4003 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->encodings.size()));
4004 std::vector<Encoding::type> ::const_iterator _iter88;
4005 for (_iter88 = this->encodings.begin(); _iter88 != this->encodings.end(); ++_iter88)
4006 {
4007 xfer += oprot->writeI32((int32_t)(*_iter88));
4008 }
4009 xfer += oprot->writeListEnd();
4010 }
4011 xfer += oprot->writeFieldEnd();
4012
4013 xfer += oprot->writeFieldBegin("path_in_schema", ::apache::thrift::protocol::T_LIST, 3);
4014 {
4015 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->path_in_schema.size()));
4016 std::vector<std::string> ::const_iterator _iter89;
4017 for (_iter89 = this->path_in_schema.begin(); _iter89 != this->path_in_schema.end(); ++_iter89)
4018 {
4019 xfer += oprot->writeString((*_iter89));
4020 }
4021 xfer += oprot->writeListEnd();
4022 }
4023 xfer += oprot->writeFieldEnd();
4024
4025 xfer += oprot->writeFieldBegin("codec", ::apache::thrift::protocol::T_I32, 4);
4026 xfer += oprot->writeI32((int32_t)this->codec);
4027 xfer += oprot->writeFieldEnd();
4028
4029 xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I64, 5);
4030 xfer += oprot->writeI64(this->num_values);
4031 xfer += oprot->writeFieldEnd();
4032
4033 xfer += oprot->writeFieldBegin("total_uncompressed_size", ::apache::thrift::protocol::T_I64, 6);
4034 xfer += oprot->writeI64(this->total_uncompressed_size);
4035 xfer += oprot->writeFieldEnd();
4036
4037 xfer += oprot->writeFieldBegin("total_compressed_size", ::apache::thrift::protocol::T_I64, 7);
4038 xfer += oprot->writeI64(this->total_compressed_size);
4039 xfer += oprot->writeFieldEnd();
4040
4041 if (this->__isset.key_value_metadata) {
4042 xfer += oprot->writeFieldBegin("key_value_metadata", ::apache::thrift::protocol::T_LIST, 8);
4043 {
4044 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->key_value_metadata.size()));
4045 std::vector<KeyValue> ::const_iterator _iter90;
4046 for (_iter90 = this->key_value_metadata.begin(); _iter90 != this->key_value_metadata.end(); ++_iter90)
4047 {
4048 xfer += (*_iter90).write(oprot);
4049 }
4050 xfer += oprot->writeListEnd();
4051 }
4052 xfer += oprot->writeFieldEnd();
4053 }
4054 xfer += oprot->writeFieldBegin("data_page_offset", ::apache::thrift::protocol::T_I64, 9);
4055 xfer += oprot->writeI64(this->data_page_offset);
4056 xfer += oprot->writeFieldEnd();
4057
4058 if (this->__isset.index_page_offset) {
4059 xfer += oprot->writeFieldBegin("index_page_offset", ::apache::thrift::protocol::T_I64, 10);
4060 xfer += oprot->writeI64(this->index_page_offset);
4061 xfer += oprot->writeFieldEnd();
4062 }
4063 if (this->__isset.dictionary_page_offset) {
4064 xfer += oprot->writeFieldBegin("dictionary_page_offset", ::apache::thrift::protocol::T_I64, 11);
4065 xfer += oprot->writeI64(this->dictionary_page_offset);
4066 xfer += oprot->writeFieldEnd();
4067 }
4068 if (this->__isset.statistics) {
4069 xfer += oprot->writeFieldBegin("statistics", ::apache::thrift::protocol::T_STRUCT, 12);
4070 xfer += this->statistics.write(oprot);
4071 xfer += oprot->writeFieldEnd();
4072 }
4073 if (this->__isset.encoding_stats) {
4074 xfer += oprot->writeFieldBegin("encoding_stats", ::apache::thrift::protocol::T_LIST, 13);
4075 {
4076 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->encoding_stats.size()));
4077 std::vector<PageEncodingStats> ::const_iterator _iter91;
4078 for (_iter91 = this->encoding_stats.begin(); _iter91 != this->encoding_stats.end(); ++_iter91)
4079 {
4080 xfer += (*_iter91).write(oprot);
4081 }
4082 xfer += oprot->writeListEnd();
4083 }
4084 xfer += oprot->writeFieldEnd();
4085 }
4086 xfer += oprot->writeFieldStop();
4087 xfer += oprot->writeStructEnd();
4088 return xfer;
4089}
4090
4091void swap(ColumnMetaData &a, ColumnMetaData &b) {
4092 using ::std::swap;
4093 swap(a.type, b.type);
4094 swap(a.encodings, b.encodings);
4095 swap(a.path_in_schema, b.path_in_schema);
4096 swap(a.codec, b.codec);
4097 swap(a.num_values, b.num_values);
4098 swap(a.total_uncompressed_size, b.total_uncompressed_size);
4099 swap(a.total_compressed_size, b.total_compressed_size);
4100 swap(a.key_value_metadata, b.key_value_metadata);
4101 swap(a.data_page_offset, b.data_page_offset);
4102 swap(a.index_page_offset, b.index_page_offset);
4103 swap(a.dictionary_page_offset, b.dictionary_page_offset);
4104 swap(a.statistics, b.statistics);
4105 swap(a.encoding_stats, b.encoding_stats);
4106 swap(a.__isset, b.__isset);
4107}
4108
4109ColumnMetaData::ColumnMetaData(const ColumnMetaData& other92) {
4110 type = other92.type;
4111 encodings = other92.encodings;
4112 path_in_schema = other92.path_in_schema;
4113 codec = other92.codec;
4114 num_values = other92.num_values;
4115 total_uncompressed_size = other92.total_uncompressed_size;
4116 total_compressed_size = other92.total_compressed_size;
4117 key_value_metadata = other92.key_value_metadata;
4118 data_page_offset = other92.data_page_offset;
4119 index_page_offset = other92.index_page_offset;
4120 dictionary_page_offset = other92.dictionary_page_offset;
4121 statistics = other92.statistics;
4122 encoding_stats = other92.encoding_stats;
4123 __isset = other92.__isset;
4124}
4125ColumnMetaData& ColumnMetaData::operator=(const ColumnMetaData& other93) {
4126 type = other93.type;
4127 encodings = other93.encodings;
4128 path_in_schema = other93.path_in_schema;
4129 codec = other93.codec;
4130 num_values = other93.num_values;
4131 total_uncompressed_size = other93.total_uncompressed_size;
4132 total_compressed_size = other93.total_compressed_size;
4133 key_value_metadata = other93.key_value_metadata;
4134 data_page_offset = other93.data_page_offset;
4135 index_page_offset = other93.index_page_offset;
4136 dictionary_page_offset = other93.dictionary_page_offset;
4137 statistics = other93.statistics;
4138 encoding_stats = other93.encoding_stats;
4139 __isset = other93.__isset;
4140 return *this;
4141}
4142void ColumnMetaData::printTo(std::ostream& out) const {
4143 using ::apache::thrift::to_string;
4144 out << "ColumnMetaData(";
4145 out << "type=" << to_string(type);
4146 out << ", " << "encodings=" << to_string(encodings);
4147 out << ", " << "path_in_schema=" << to_string(path_in_schema);
4148 out << ", " << "codec=" << to_string(codec);
4149 out << ", " << "num_values=" << to_string(num_values);
4150 out << ", " << "total_uncompressed_size=" << to_string(total_uncompressed_size);
4151 out << ", " << "total_compressed_size=" << to_string(total_compressed_size);
4152 out << ", " << "key_value_metadata="; (__isset.key_value_metadata ? (out << to_string(key_value_metadata)) : (out << "<null>"));
4153 out << ", " << "data_page_offset=" << to_string(data_page_offset);
4154 out << ", " << "index_page_offset="; (__isset.index_page_offset ? (out << to_string(index_page_offset)) : (out << "<null>"));
4155 out << ", " << "dictionary_page_offset="; (__isset.dictionary_page_offset ? (out << to_string(dictionary_page_offset)) : (out << "<null>"));
4156 out << ", " << "statistics="; (__isset.statistics ? (out << to_string(statistics)) : (out << "<null>"));
4157 out << ", " << "encoding_stats="; (__isset.encoding_stats ? (out << to_string(encoding_stats)) : (out << "<null>"));
4158 out << ")";
4159}
4160
4161
4162EncryptionWithFooterKey::~EncryptionWithFooterKey() throw() {
4163}
4164
4165std::ostream& operator<<(std::ostream& out, const EncryptionWithFooterKey& obj)
4166{
4167 obj.printTo(out);
4168 return out;
4169}
4170
4171
4172uint32_t EncryptionWithFooterKey::read(::apache::thrift::protocol::TProtocol* iprot) {
4173
4174 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
4175 uint32_t xfer = 0;
4176 std::string fname;
4177 ::apache::thrift::protocol::TType ftype;
4178 int16_t fid;
4179
4180 xfer += iprot->readStructBegin(fname);
4181
4182 using ::apache::thrift::protocol::TProtocolException;
4183
4184
4185 while (true)
4186 {
4187 xfer += iprot->readFieldBegin(fname, ftype, fid);
4188 if (ftype == ::apache::thrift::protocol::T_STOP) {
4189 break;
4190 }
4191 xfer += iprot->skip(ftype);
4192 xfer += iprot->readFieldEnd();
4193 }
4194
4195 xfer += iprot->readStructEnd();
4196
4197 return xfer;
4198}
4199
4200uint32_t EncryptionWithFooterKey::write(::apache::thrift::protocol::TProtocol* oprot) const {
4201 uint32_t xfer = 0;
4202 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
4203 xfer += oprot->writeStructBegin("EncryptionWithFooterKey");
4204
4205 xfer += oprot->writeFieldStop();
4206 xfer += oprot->writeStructEnd();
4207 return xfer;
4208}
4209
4210void swap(EncryptionWithFooterKey &a, EncryptionWithFooterKey &b) {
4211 using ::std::swap;
4212 (void) a;
4213 (void) b;
4214}
4215
4216EncryptionWithFooterKey::EncryptionWithFooterKey(const EncryptionWithFooterKey& other94) {
4217 (void) other94;
4218}
4219EncryptionWithFooterKey& EncryptionWithFooterKey::operator=(const EncryptionWithFooterKey& other95) {
4220 (void) other95;
4221 return *this;
4222}
4223void EncryptionWithFooterKey::printTo(std::ostream& out) const {
4224 using ::apache::thrift::to_string;
4225 out << "EncryptionWithFooterKey(";
4226 out << ")";
4227}
4228
4229
4230EncryptionWithColumnKey::~EncryptionWithColumnKey() throw() {
4231}
4232
4233
4234void EncryptionWithColumnKey::__set_path_in_schema(const std::vector<std::string> & val) {
4235 this->path_in_schema = val;
4236}
4237
4238void EncryptionWithColumnKey::__set_column_key_metadata(const std::string& val) {
4239 this->column_key_metadata = val;
4240__isset.column_key_metadata = true;
4241}
4242std::ostream& operator<<(std::ostream& out, const EncryptionWithColumnKey& obj)
4243{
4244 obj.printTo(out);
4245 return out;
4246}
4247
4248
4249uint32_t EncryptionWithColumnKey::read(::apache::thrift::protocol::TProtocol* iprot) {
4250
4251 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
4252 uint32_t xfer = 0;
4253 std::string fname;
4254 ::apache::thrift::protocol::TType ftype;
4255 int16_t fid;
4256
4257 xfer += iprot->readStructBegin(fname);
4258
4259 using ::apache::thrift::protocol::TProtocolException;
4260
4261 bool isset_path_in_schema = false;
4262
4263 while (true)
4264 {
4265 xfer += iprot->readFieldBegin(fname, ftype, fid);
4266 if (ftype == ::apache::thrift::protocol::T_STOP) {
4267 break;
4268 }
4269 switch (fid)
4270 {
4271 case 1:
4272 if (ftype == ::apache::thrift::protocol::T_LIST) {
4273 {
4274 this->path_in_schema.clear();
4275 uint32_t _size96;
4276 ::apache::thrift::protocol::TType _etype99;
4277 xfer += iprot->readListBegin(_etype99, _size96);
4278 this->path_in_schema.resize(_size96);
4279 uint32_t _i100;
4280 for (_i100 = 0; _i100 < _size96; ++_i100)
4281 {
4282 xfer += iprot->readString(this->path_in_schema[_i100]);
4283 }
4284 xfer += iprot->readListEnd();
4285 }
4286 isset_path_in_schema = true;
4287 } else {
4288 xfer += iprot->skip(ftype);
4289 }
4290 break;
4291 case 2:
4292 if (ftype == ::apache::thrift::protocol::T_STRING) {
4293 xfer += iprot->readBinary(this->column_key_metadata);
4294 this->__isset.column_key_metadata = true;
4295 } else {
4296 xfer += iprot->skip(ftype);
4297 }
4298 break;
4299 default:
4300 xfer += iprot->skip(ftype);
4301 break;
4302 }
4303 xfer += iprot->readFieldEnd();
4304 }
4305
4306 xfer += iprot->readStructEnd();
4307
4308 if (!isset_path_in_schema)
4309 throw TProtocolException(TProtocolException::INVALID_DATA);
4310 return xfer;
4311}
4312
4313uint32_t EncryptionWithColumnKey::write(::apache::thrift::protocol::TProtocol* oprot) const {
4314 uint32_t xfer = 0;
4315 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
4316 xfer += oprot->writeStructBegin("EncryptionWithColumnKey");
4317
4318 xfer += oprot->writeFieldBegin("path_in_schema", ::apache::thrift::protocol::T_LIST, 1);
4319 {
4320 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->path_in_schema.size()));
4321 std::vector<std::string> ::const_iterator _iter101;
4322 for (_iter101 = this->path_in_schema.begin(); _iter101 != this->path_in_schema.end(); ++_iter101)
4323 {
4324 xfer += oprot->writeString((*_iter101));
4325 }
4326 xfer += oprot->writeListEnd();
4327 }
4328 xfer += oprot->writeFieldEnd();
4329
4330 if (this->__isset.column_key_metadata) {
4331 xfer += oprot->writeFieldBegin("column_key_metadata", ::apache::thrift::protocol::T_STRING, 2);
4332 xfer += oprot->writeBinary(this->column_key_metadata);
4333 xfer += oprot->writeFieldEnd();
4334 }
4335 xfer += oprot->writeFieldStop();
4336 xfer += oprot->writeStructEnd();
4337 return xfer;
4338}
4339
4340void swap(EncryptionWithColumnKey &a, EncryptionWithColumnKey &b) {
4341 using ::std::swap;
4342 swap(a.path_in_schema, b.path_in_schema);
4343 swap(a.column_key_metadata, b.column_key_metadata);
4344 swap(a.__isset, b.__isset);
4345}
4346
4347EncryptionWithColumnKey::EncryptionWithColumnKey(const EncryptionWithColumnKey& other102) {
4348 path_in_schema = other102.path_in_schema;
4349 column_key_metadata = other102.column_key_metadata;
4350 __isset = other102.__isset;
4351}
4352EncryptionWithColumnKey& EncryptionWithColumnKey::operator=(const EncryptionWithColumnKey& other103) {
4353 path_in_schema = other103.path_in_schema;
4354 column_key_metadata = other103.column_key_metadata;
4355 __isset = other103.__isset;
4356 return *this;
4357}
4358void EncryptionWithColumnKey::printTo(std::ostream& out) const {
4359 using ::apache::thrift::to_string;
4360 out << "EncryptionWithColumnKey(";
4361 out << "path_in_schema=" << to_string(path_in_schema);
4362 out << ", " << "column_key_metadata="; (__isset.column_key_metadata ? (out << to_string(column_key_metadata)) : (out << "<null>"));
4363 out << ")";
4364}
4365
4366
4367ColumnCryptoMetaData::~ColumnCryptoMetaData() throw() {
4368}
4369
4370
4371void ColumnCryptoMetaData::__set_ENCRYPTION_WITH_FOOTER_KEY(const EncryptionWithFooterKey& val) {
4372 this->ENCRYPTION_WITH_FOOTER_KEY = val;
4373__isset.ENCRYPTION_WITH_FOOTER_KEY = true;
4374}
4375
4376void ColumnCryptoMetaData::__set_ENCRYPTION_WITH_COLUMN_KEY(const EncryptionWithColumnKey& val) {
4377 this->ENCRYPTION_WITH_COLUMN_KEY = val;
4378__isset.ENCRYPTION_WITH_COLUMN_KEY = true;
4379}
4380std::ostream& operator<<(std::ostream& out, const ColumnCryptoMetaData& obj)
4381{
4382 obj.printTo(out);
4383 return out;
4384}
4385
4386
4387uint32_t ColumnCryptoMetaData::read(::apache::thrift::protocol::TProtocol* iprot) {
4388
4389 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
4390 uint32_t xfer = 0;
4391 std::string fname;
4392 ::apache::thrift::protocol::TType ftype;
4393 int16_t fid;
4394
4395 xfer += iprot->readStructBegin(fname);
4396
4397 using ::apache::thrift::protocol::TProtocolException;
4398
4399
4400 while (true)
4401 {
4402 xfer += iprot->readFieldBegin(fname, ftype, fid);
4403 if (ftype == ::apache::thrift::protocol::T_STOP) {
4404 break;
4405 }
4406 switch (fid)
4407 {
4408 case 1:
4409 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
4410 xfer += this->ENCRYPTION_WITH_FOOTER_KEY.read(iprot);
4411 this->__isset.ENCRYPTION_WITH_FOOTER_KEY = true;
4412 } else {
4413 xfer += iprot->skip(ftype);
4414 }
4415 break;
4416 case 2:
4417 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
4418 xfer += this->ENCRYPTION_WITH_COLUMN_KEY.read(iprot);
4419 this->__isset.ENCRYPTION_WITH_COLUMN_KEY = true;
4420 } else {
4421 xfer += iprot->skip(ftype);
4422 }
4423 break;
4424 default:
4425 xfer += iprot->skip(ftype);
4426 break;
4427 }
4428 xfer += iprot->readFieldEnd();
4429 }
4430
4431 xfer += iprot->readStructEnd();
4432
4433 return xfer;
4434}
4435
4436uint32_t ColumnCryptoMetaData::write(::apache::thrift::protocol::TProtocol* oprot) const {
4437 uint32_t xfer = 0;
4438 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
4439 xfer += oprot->writeStructBegin("ColumnCryptoMetaData");
4440
4441 if (this->__isset.ENCRYPTION_WITH_FOOTER_KEY) {
4442 xfer += oprot->writeFieldBegin("ENCRYPTION_WITH_FOOTER_KEY", ::apache::thrift::protocol::T_STRUCT, 1);
4443 xfer += this->ENCRYPTION_WITH_FOOTER_KEY.write(oprot);
4444 xfer += oprot->writeFieldEnd();
4445 }
4446 if (this->__isset.ENCRYPTION_WITH_COLUMN_KEY) {
4447 xfer += oprot->writeFieldBegin("ENCRYPTION_WITH_COLUMN_KEY", ::apache::thrift::protocol::T_STRUCT, 2);
4448 xfer += this->ENCRYPTION_WITH_COLUMN_KEY.write(oprot);
4449 xfer += oprot->writeFieldEnd();
4450 }
4451 xfer += oprot->writeFieldStop();
4452 xfer += oprot->writeStructEnd();
4453 return xfer;
4454}
4455
4456void swap(ColumnCryptoMetaData &a, ColumnCryptoMetaData &b) {
4457 using ::std::swap;
4458 swap(a.ENCRYPTION_WITH_FOOTER_KEY, b.ENCRYPTION_WITH_FOOTER_KEY);
4459 swap(a.ENCRYPTION_WITH_COLUMN_KEY, b.ENCRYPTION_WITH_COLUMN_KEY);
4460 swap(a.__isset, b.__isset);
4461}
4462
4463ColumnCryptoMetaData::ColumnCryptoMetaData(const ColumnCryptoMetaData& other104) {
4464 ENCRYPTION_WITH_FOOTER_KEY = other104.ENCRYPTION_WITH_FOOTER_KEY;
4465 ENCRYPTION_WITH_COLUMN_KEY = other104.ENCRYPTION_WITH_COLUMN_KEY;
4466 __isset = other104.__isset;
4467}
4468ColumnCryptoMetaData& ColumnCryptoMetaData::operator=(const ColumnCryptoMetaData& other105) {
4469 ENCRYPTION_WITH_FOOTER_KEY = other105.ENCRYPTION_WITH_FOOTER_KEY;
4470 ENCRYPTION_WITH_COLUMN_KEY = other105.ENCRYPTION_WITH_COLUMN_KEY;
4471 __isset = other105.__isset;
4472 return *this;
4473}
4474void ColumnCryptoMetaData::printTo(std::ostream& out) const {
4475 using ::apache::thrift::to_string;
4476 out << "ColumnCryptoMetaData(";
4477 out << "ENCRYPTION_WITH_FOOTER_KEY="; (__isset.ENCRYPTION_WITH_FOOTER_KEY ? (out << to_string(ENCRYPTION_WITH_FOOTER_KEY)) : (out << "<null>"));
4478 out << ", " << "ENCRYPTION_WITH_COLUMN_KEY="; (__isset.ENCRYPTION_WITH_COLUMN_KEY ? (out << to_string(ENCRYPTION_WITH_COLUMN_KEY)) : (out << "<null>"));
4479 out << ")";
4480}
4481
4482
4483ColumnChunk::~ColumnChunk() throw() {
4484}
4485
4486
4487void ColumnChunk::__set_file_path(const std::string& val) {
4488 this->file_path = val;
4489__isset.file_path = true;
4490}
4491
4492void ColumnChunk::__set_file_offset(const int64_t val) {
4493 this->file_offset = val;
4494}
4495
4496void ColumnChunk::__set_meta_data(const ColumnMetaData& val) {
4497 this->meta_data = val;
4498__isset.meta_data = true;
4499}
4500
4501void ColumnChunk::__set_offset_index_offset(const int64_t val) {
4502 this->offset_index_offset = val;
4503__isset.offset_index_offset = true;
4504}
4505
4506void ColumnChunk::__set_offset_index_length(const int32_t val) {
4507 this->offset_index_length = val;
4508__isset.offset_index_length = true;
4509}
4510
4511void ColumnChunk::__set_column_index_offset(const int64_t val) {
4512 this->column_index_offset = val;
4513__isset.column_index_offset = true;
4514}
4515
4516void ColumnChunk::__set_column_index_length(const int32_t val) {
4517 this->column_index_length = val;
4518__isset.column_index_length = true;
4519}
4520
4521void ColumnChunk::__set_crypto_meta_data(const ColumnCryptoMetaData& val) {
4522 this->crypto_meta_data = val;
4523__isset.crypto_meta_data = true;
4524}
4525std::ostream& operator<<(std::ostream& out, const ColumnChunk& obj)
4526{
4527 obj.printTo(out);
4528 return out;
4529}
4530
4531
4532uint32_t ColumnChunk::read(::apache::thrift::protocol::TProtocol* iprot) {
4533
4534 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
4535 uint32_t xfer = 0;
4536 std::string fname;
4537 ::apache::thrift::protocol::TType ftype;
4538 int16_t fid;
4539
4540 xfer += iprot->readStructBegin(fname);
4541
4542 using ::apache::thrift::protocol::TProtocolException;
4543
4544 bool isset_file_offset = false;
4545
4546 while (true)
4547 {
4548 xfer += iprot->readFieldBegin(fname, ftype, fid);
4549 if (ftype == ::apache::thrift::protocol::T_STOP) {
4550 break;
4551 }
4552 switch (fid)
4553 {
4554 case 1:
4555 if (ftype == ::apache::thrift::protocol::T_STRING) {
4556 xfer += iprot->readString(this->file_path);
4557 this->__isset.file_path = true;
4558 } else {
4559 xfer += iprot->skip(ftype);
4560 }
4561 break;
4562 case 2:
4563 if (ftype == ::apache::thrift::protocol::T_I64) {
4564 xfer += iprot->readI64(this->file_offset);
4565 isset_file_offset = true;
4566 } else {
4567 xfer += iprot->skip(ftype);
4568 }
4569 break;
4570 case 3:
4571 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
4572 xfer += this->meta_data.read(iprot);
4573 this->__isset.meta_data = true;
4574 } else {
4575 xfer += iprot->skip(ftype);
4576 }
4577 break;
4578 case 4:
4579 if (ftype == ::apache::thrift::protocol::T_I64) {
4580 xfer += iprot->readI64(this->offset_index_offset);
4581 this->__isset.offset_index_offset = true;
4582 } else {
4583 xfer += iprot->skip(ftype);
4584 }
4585 break;
4586 case 5:
4587 if (ftype == ::apache::thrift::protocol::T_I32) {
4588 xfer += iprot->readI32(this->offset_index_length);
4589 this->__isset.offset_index_length = true;
4590 } else {
4591 xfer += iprot->skip(ftype);
4592 }
4593 break;
4594 case 6:
4595 if (ftype == ::apache::thrift::protocol::T_I64) {
4596 xfer += iprot->readI64(this->column_index_offset);
4597 this->__isset.column_index_offset = true;
4598 } else {
4599 xfer += iprot->skip(ftype);
4600 }
4601 break;
4602 case 7:
4603 if (ftype == ::apache::thrift::protocol::T_I32) {
4604 xfer += iprot->readI32(this->column_index_length);
4605 this->__isset.column_index_length = true;
4606 } else {
4607 xfer += iprot->skip(ftype);
4608 }
4609 break;
4610 case 8:
4611 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
4612 xfer += this->crypto_meta_data.read(iprot);
4613 this->__isset.crypto_meta_data = true;
4614 } else {
4615 xfer += iprot->skip(ftype);
4616 }
4617 break;
4618 default:
4619 xfer += iprot->skip(ftype);
4620 break;
4621 }
4622 xfer += iprot->readFieldEnd();
4623 }
4624
4625 xfer += iprot->readStructEnd();
4626
4627 if (!isset_file_offset)
4628 throw TProtocolException(TProtocolException::INVALID_DATA);
4629 return xfer;
4630}
4631
4632uint32_t ColumnChunk::write(::apache::thrift::protocol::TProtocol* oprot) const {
4633 uint32_t xfer = 0;
4634 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
4635 xfer += oprot->writeStructBegin("ColumnChunk");
4636
4637 if (this->__isset.file_path) {
4638 xfer += oprot->writeFieldBegin("file_path", ::apache::thrift::protocol::T_STRING, 1);
4639 xfer += oprot->writeString(this->file_path);
4640 xfer += oprot->writeFieldEnd();
4641 }
4642 xfer += oprot->writeFieldBegin("file_offset", ::apache::thrift::protocol::T_I64, 2);
4643 xfer += oprot->writeI64(this->file_offset);
4644 xfer += oprot->writeFieldEnd();
4645
4646 if (this->__isset.meta_data) {
4647 xfer += oprot->writeFieldBegin("meta_data", ::apache::thrift::protocol::T_STRUCT, 3);
4648 xfer += this->meta_data.write(oprot);
4649 xfer += oprot->writeFieldEnd();
4650 }
4651 if (this->__isset.offset_index_offset) {
4652 xfer += oprot->writeFieldBegin("offset_index_offset", ::apache::thrift::protocol::T_I64, 4);
4653 xfer += oprot->writeI64(this->offset_index_offset);
4654 xfer += oprot->writeFieldEnd();
4655 }
4656 if (this->__isset.offset_index_length) {
4657 xfer += oprot->writeFieldBegin("offset_index_length", ::apache::thrift::protocol::T_I32, 5);
4658 xfer += oprot->writeI32(this->offset_index_length);
4659 xfer += oprot->writeFieldEnd();
4660 }
4661 if (this->__isset.column_index_offset) {
4662 xfer += oprot->writeFieldBegin("column_index_offset", ::apache::thrift::protocol::T_I64, 6);
4663 xfer += oprot->writeI64(this->column_index_offset);
4664 xfer += oprot->writeFieldEnd();
4665 }
4666 if (this->__isset.column_index_length) {
4667 xfer += oprot->writeFieldBegin("column_index_length", ::apache::thrift::protocol::T_I32, 7);
4668 xfer += oprot->writeI32(this->column_index_length);
4669 xfer += oprot->writeFieldEnd();
4670 }
4671 if (this->__isset.crypto_meta_data) {
4672 xfer += oprot->writeFieldBegin("crypto_meta_data", ::apache::thrift::protocol::T_STRUCT, 8);
4673 xfer += this->crypto_meta_data.write(oprot);
4674 xfer += oprot->writeFieldEnd();
4675 }
4676 xfer += oprot->writeFieldStop();
4677 xfer += oprot->writeStructEnd();
4678 return xfer;
4679}
4680
4681void swap(ColumnChunk &a, ColumnChunk &b) {
4682 using ::std::swap;
4683 swap(a.file_path, b.file_path);
4684 swap(a.file_offset, b.file_offset);
4685 swap(a.meta_data, b.meta_data);
4686 swap(a.offset_index_offset, b.offset_index_offset);
4687 swap(a.offset_index_length, b.offset_index_length);
4688 swap(a.column_index_offset, b.column_index_offset);
4689 swap(a.column_index_length, b.column_index_length);
4690 swap(a.crypto_meta_data, b.crypto_meta_data);
4691 swap(a.__isset, b.__isset);
4692}
4693
4694ColumnChunk::ColumnChunk(const ColumnChunk& other106) {
4695 file_path = other106.file_path;
4696 file_offset = other106.file_offset;
4697 meta_data = other106.meta_data;
4698 offset_index_offset = other106.offset_index_offset;
4699 offset_index_length = other106.offset_index_length;
4700 column_index_offset = other106.column_index_offset;
4701 column_index_length = other106.column_index_length;
4702 crypto_meta_data = other106.crypto_meta_data;
4703 __isset = other106.__isset;
4704}
4705ColumnChunk& ColumnChunk::operator=(const ColumnChunk& other107) {
4706 file_path = other107.file_path;
4707 file_offset = other107.file_offset;
4708 meta_data = other107.meta_data;
4709 offset_index_offset = other107.offset_index_offset;
4710 offset_index_length = other107.offset_index_length;
4711 column_index_offset = other107.column_index_offset;
4712 column_index_length = other107.column_index_length;
4713 crypto_meta_data = other107.crypto_meta_data;
4714 __isset = other107.__isset;
4715 return *this;
4716}
4717void ColumnChunk::printTo(std::ostream& out) const {
4718 using ::apache::thrift::to_string;
4719 out << "ColumnChunk(";
4720 out << "file_path="; (__isset.file_path ? (out << to_string(file_path)) : (out << "<null>"));
4721 out << ", " << "file_offset=" << to_string(file_offset);
4722 out << ", " << "meta_data="; (__isset.meta_data ? (out << to_string(meta_data)) : (out << "<null>"));
4723 out << ", " << "offset_index_offset="; (__isset.offset_index_offset ? (out << to_string(offset_index_offset)) : (out << "<null>"));
4724 out << ", " << "offset_index_length="; (__isset.offset_index_length ? (out << to_string(offset_index_length)) : (out << "<null>"));
4725 out << ", " << "column_index_offset="; (__isset.column_index_offset ? (out << to_string(column_index_offset)) : (out << "<null>"));
4726 out << ", " << "column_index_length="; (__isset.column_index_length ? (out << to_string(column_index_length)) : (out << "<null>"));
4727 out << ", " << "crypto_meta_data="; (__isset.crypto_meta_data ? (out << to_string(crypto_meta_data)) : (out << "<null>"));
4728 out << ")";
4729}
4730
4731
4732RowGroup::~RowGroup() throw() {
4733}
4734
4735
4736void RowGroup::__set_columns(const std::vector<ColumnChunk> & val) {
4737 this->columns = val;
4738}
4739
4740void RowGroup::__set_total_byte_size(const int64_t val) {
4741 this->total_byte_size = val;
4742}
4743
4744void RowGroup::__set_num_rows(const int64_t val) {
4745 this->num_rows = val;
4746}
4747
4748void RowGroup::__set_sorting_columns(const std::vector<SortingColumn> & val) {
4749 this->sorting_columns = val;
4750__isset.sorting_columns = true;
4751}
4752
4753void RowGroup::__set_file_offset(const int64_t val) {
4754 this->file_offset = val;
4755__isset.file_offset = true;
4756}
4757
4758void RowGroup::__set_total_compressed_size(const int64_t val) {
4759 this->total_compressed_size = val;
4760__isset.total_compressed_size = true;
4761}
4762std::ostream& operator<<(std::ostream& out, const RowGroup& obj)
4763{
4764 obj.printTo(out);
4765 return out;
4766}
4767
4768
4769uint32_t RowGroup::read(::apache::thrift::protocol::TProtocol* iprot) {
4770
4771 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
4772 uint32_t xfer = 0;
4773 std::string fname;
4774 ::apache::thrift::protocol::TType ftype;
4775 int16_t fid;
4776
4777 xfer += iprot->readStructBegin(fname);
4778
4779 using ::apache::thrift::protocol::TProtocolException;
4780
4781 bool isset_columns = false;
4782 bool isset_total_byte_size = false;
4783 bool isset_num_rows = false;
4784
4785 while (true)
4786 {
4787 xfer += iprot->readFieldBegin(fname, ftype, fid);
4788 if (ftype == ::apache::thrift::protocol::T_STOP) {
4789 break;
4790 }
4791 switch (fid)
4792 {
4793 case 1:
4794 if (ftype == ::apache::thrift::protocol::T_LIST) {
4795 {
4796 this->columns.clear();
4797 uint32_t _size108;
4798 ::apache::thrift::protocol::TType _etype111;
4799 xfer += iprot->readListBegin(_etype111, _size108);
4800 this->columns.resize(_size108);
4801 uint32_t _i112;
4802 for (_i112 = 0; _i112 < _size108; ++_i112)
4803 {
4804 xfer += this->columns[_i112].read(iprot);
4805 }
4806 xfer += iprot->readListEnd();
4807 }
4808 isset_columns = true;
4809 } else {
4810 xfer += iprot->skip(ftype);
4811 }
4812 break;
4813 case 2:
4814 if (ftype == ::apache::thrift::protocol::T_I64) {
4815 xfer += iprot->readI64(this->total_byte_size);
4816 isset_total_byte_size = true;
4817 } else {
4818 xfer += iprot->skip(ftype);
4819 }
4820 break;
4821 case 3:
4822 if (ftype == ::apache::thrift::protocol::T_I64) {
4823 xfer += iprot->readI64(this->num_rows);
4824 isset_num_rows = true;
4825 } else {
4826 xfer += iprot->skip(ftype);
4827 }
4828 break;
4829 case 4:
4830 if (ftype == ::apache::thrift::protocol::T_LIST) {
4831 {
4832 this->sorting_columns.clear();
4833 uint32_t _size113;
4834 ::apache::thrift::protocol::TType _etype116;
4835 xfer += iprot->readListBegin(_etype116, _size113);
4836 this->sorting_columns.resize(_size113);
4837 uint32_t _i117;
4838 for (_i117 = 0; _i117 < _size113; ++_i117)
4839 {
4840 xfer += this->sorting_columns[_i117].read(iprot);
4841 }
4842 xfer += iprot->readListEnd();
4843 }
4844 this->__isset.sorting_columns = true;
4845 } else {
4846 xfer += iprot->skip(ftype);
4847 }
4848 break;
4849 case 5:
4850 if (ftype == ::apache::thrift::protocol::T_I64) {
4851 xfer += iprot->readI64(this->file_offset);
4852 this->__isset.file_offset = true;
4853 } else {
4854 xfer += iprot->skip(ftype);
4855 }
4856 break;
4857 case 6:
4858 if (ftype == ::apache::thrift::protocol::T_I64) {
4859 xfer += iprot->readI64(this->total_compressed_size);
4860 this->__isset.total_compressed_size = true;
4861 } else {
4862 xfer += iprot->skip(ftype);
4863 }
4864 break;
4865 default:
4866 xfer += iprot->skip(ftype);
4867 break;
4868 }
4869 xfer += iprot->readFieldEnd();
4870 }
4871
4872 xfer += iprot->readStructEnd();
4873
4874 if (!isset_columns)
4875 throw TProtocolException(TProtocolException::INVALID_DATA);
4876 if (!isset_total_byte_size)
4877 throw TProtocolException(TProtocolException::INVALID_DATA);
4878 if (!isset_num_rows)
4879 throw TProtocolException(TProtocolException::INVALID_DATA);
4880 return xfer;
4881}
4882
4883uint32_t RowGroup::write(::apache::thrift::protocol::TProtocol* oprot) const {
4884 uint32_t xfer = 0;
4885 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
4886 xfer += oprot->writeStructBegin("RowGroup");
4887
4888 xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 1);
4889 {
4890 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->columns.size()));
4891 std::vector<ColumnChunk> ::const_iterator _iter118;
4892 for (_iter118 = this->columns.begin(); _iter118 != this->columns.end(); ++_iter118)
4893 {
4894 xfer += (*_iter118).write(oprot);
4895 }
4896 xfer += oprot->writeListEnd();
4897 }
4898 xfer += oprot->writeFieldEnd();
4899
4900 xfer += oprot->writeFieldBegin("total_byte_size", ::apache::thrift::protocol::T_I64, 2);
4901 xfer += oprot->writeI64(this->total_byte_size);
4902 xfer += oprot->writeFieldEnd();
4903
4904 xfer += oprot->writeFieldBegin("num_rows", ::apache::thrift::protocol::T_I64, 3);
4905 xfer += oprot->writeI64(this->num_rows);
4906 xfer += oprot->writeFieldEnd();
4907
4908 if (this->__isset.sorting_columns) {
4909 xfer += oprot->writeFieldBegin("sorting_columns", ::apache::thrift::protocol::T_LIST, 4);
4910 {
4911 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->sorting_columns.size()));
4912 std::vector<SortingColumn> ::const_iterator _iter119;
4913 for (_iter119 = this->sorting_columns.begin(); _iter119 != this->sorting_columns.end(); ++_iter119)
4914 {
4915 xfer += (*_iter119).write(oprot);
4916 }
4917 xfer += oprot->writeListEnd();
4918 }
4919 xfer += oprot->writeFieldEnd();
4920 }
4921 if (this->__isset.file_offset) {
4922 xfer += oprot->writeFieldBegin("file_offset", ::apache::thrift::protocol::T_I64, 5);
4923 xfer += oprot->writeI64(this->file_offset);
4924 xfer += oprot->writeFieldEnd();
4925 }
4926 if (this->__isset.total_compressed_size) {
4927 xfer += oprot->writeFieldBegin("total_compressed_size", ::apache::thrift::protocol::T_I64, 6);
4928 xfer += oprot->writeI64(this->total_compressed_size);
4929 xfer += oprot->writeFieldEnd();
4930 }
4931 xfer += oprot->writeFieldStop();
4932 xfer += oprot->writeStructEnd();
4933 return xfer;
4934}
4935
4936void swap(RowGroup &a, RowGroup &b) {
4937 using ::std::swap;
4938 swap(a.columns, b.columns);
4939 swap(a.total_byte_size, b.total_byte_size);
4940 swap(a.num_rows, b.num_rows);
4941 swap(a.sorting_columns, b.sorting_columns);
4942 swap(a.file_offset, b.file_offset);
4943 swap(a.total_compressed_size, b.total_compressed_size);
4944 swap(a.__isset, b.__isset);
4945}
4946
4947RowGroup::RowGroup(const RowGroup& other120) {
4948 columns = other120.columns;
4949 total_byte_size = other120.total_byte_size;
4950 num_rows = other120.num_rows;
4951 sorting_columns = other120.sorting_columns;
4952 file_offset = other120.file_offset;
4953 total_compressed_size = other120.total_compressed_size;
4954 __isset = other120.__isset;
4955}
4956RowGroup& RowGroup::operator=(const RowGroup& other121) {
4957 columns = other121.columns;
4958 total_byte_size = other121.total_byte_size;
4959 num_rows = other121.num_rows;
4960 sorting_columns = other121.sorting_columns;
4961 file_offset = other121.file_offset;
4962 total_compressed_size = other121.total_compressed_size;
4963 __isset = other121.__isset;
4964 return *this;
4965}
4966void RowGroup::printTo(std::ostream& out) const {
4967 using ::apache::thrift::to_string;
4968 out << "RowGroup(";
4969 out << "columns=" << to_string(columns);
4970 out << ", " << "total_byte_size=" << to_string(total_byte_size);
4971 out << ", " << "num_rows=" << to_string(num_rows);
4972 out << ", " << "sorting_columns="; (__isset.sorting_columns ? (out << to_string(sorting_columns)) : (out << "<null>"));
4973 out << ", " << "file_offset="; (__isset.file_offset ? (out << to_string(file_offset)) : (out << "<null>"));
4974 out << ", " << "total_compressed_size="; (__isset.total_compressed_size ? (out << to_string(total_compressed_size)) : (out << "<null>"));
4975 out << ")";
4976}
4977
4978
4979TypeDefinedOrder::~TypeDefinedOrder() throw() {
4980}
4981
4982std::ostream& operator<<(std::ostream& out, const TypeDefinedOrder& obj)
4983{
4984 obj.printTo(out);
4985 return out;
4986}
4987
4988
4989uint32_t TypeDefinedOrder::read(::apache::thrift::protocol::TProtocol* iprot) {
4990
4991 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
4992 uint32_t xfer = 0;
4993 std::string fname;
4994 ::apache::thrift::protocol::TType ftype;
4995 int16_t fid;
4996
4997 xfer += iprot->readStructBegin(fname);
4998
4999 using ::apache::thrift::protocol::TProtocolException;
5000
5001
5002 while (true)
5003 {
5004 xfer += iprot->readFieldBegin(fname, ftype, fid);
5005 if (ftype == ::apache::thrift::protocol::T_STOP) {
5006 break;
5007 }
5008 xfer += iprot->skip(ftype);
5009 xfer += iprot->readFieldEnd();
5010 }
5011
5012 xfer += iprot->readStructEnd();
5013
5014 return xfer;
5015}
5016
5017uint32_t TypeDefinedOrder::write(::apache::thrift::protocol::TProtocol* oprot) const {
5018 uint32_t xfer = 0;
5019 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
5020 xfer += oprot->writeStructBegin("TypeDefinedOrder");
5021
5022 xfer += oprot->writeFieldStop();
5023 xfer += oprot->writeStructEnd();
5024 return xfer;
5025}
5026
5027void swap(TypeDefinedOrder &a, TypeDefinedOrder &b) {
5028 using ::std::swap;
5029 (void) a;
5030 (void) b;
5031}
5032
5033TypeDefinedOrder::TypeDefinedOrder(const TypeDefinedOrder& other122) {
5034 (void) other122;
5035}
5036TypeDefinedOrder& TypeDefinedOrder::operator=(const TypeDefinedOrder& other123) {
5037 (void) other123;
5038 return *this;
5039}
5040void TypeDefinedOrder::printTo(std::ostream& out) const {
5041 using ::apache::thrift::to_string;
5042 out << "TypeDefinedOrder(";
5043 out << ")";
5044}
5045
5046
5047ColumnOrder::~ColumnOrder() throw() {
5048}
5049
5050
5051void ColumnOrder::__set_TYPE_ORDER(const TypeDefinedOrder& val) {
5052 this->TYPE_ORDER = val;
5053__isset.TYPE_ORDER = true;
5054}
5055std::ostream& operator<<(std::ostream& out, const ColumnOrder& obj)
5056{
5057 obj.printTo(out);
5058 return out;
5059}
5060
5061
5062uint32_t ColumnOrder::read(::apache::thrift::protocol::TProtocol* iprot) {
5063
5064 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
5065 uint32_t xfer = 0;
5066 std::string fname;
5067 ::apache::thrift::protocol::TType ftype;
5068 int16_t fid;
5069
5070 xfer += iprot->readStructBegin(fname);
5071
5072 using ::apache::thrift::protocol::TProtocolException;
5073
5074
5075 while (true)
5076 {
5077 xfer += iprot->readFieldBegin(fname, ftype, fid);
5078 if (ftype == ::apache::thrift::protocol::T_STOP) {
5079 break;
5080 }
5081 switch (fid)
5082 {
5083 case 1:
5084 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
5085 xfer += this->TYPE_ORDER.read(iprot);
5086 this->__isset.TYPE_ORDER = true;
5087 } else {
5088 xfer += iprot->skip(ftype);
5089 }
5090 break;
5091 default:
5092 xfer += iprot->skip(ftype);
5093 break;
5094 }
5095 xfer += iprot->readFieldEnd();
5096 }
5097
5098 xfer += iprot->readStructEnd();
5099
5100 return xfer;
5101}
5102
5103uint32_t ColumnOrder::write(::apache::thrift::protocol::TProtocol* oprot) const {
5104 uint32_t xfer = 0;
5105 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
5106 xfer += oprot->writeStructBegin("ColumnOrder");
5107
5108 if (this->__isset.TYPE_ORDER) {
5109 xfer += oprot->writeFieldBegin("TYPE_ORDER", ::apache::thrift::protocol::T_STRUCT, 1);
5110 xfer += this->TYPE_ORDER.write(oprot);
5111 xfer += oprot->writeFieldEnd();
5112 }
5113 xfer += oprot->writeFieldStop();
5114 xfer += oprot->writeStructEnd();
5115 return xfer;
5116}
5117
5118void swap(ColumnOrder &a, ColumnOrder &b) {
5119 using ::std::swap;
5120 swap(a.TYPE_ORDER, b.TYPE_ORDER);
5121 swap(a.__isset, b.__isset);
5122}
5123
5124ColumnOrder::ColumnOrder(const ColumnOrder& other124) {
5125 TYPE_ORDER = other124.TYPE_ORDER;
5126 __isset = other124.__isset;
5127}
5128ColumnOrder& ColumnOrder::operator=(const ColumnOrder& other125) {
5129 TYPE_ORDER = other125.TYPE_ORDER;
5130 __isset = other125.__isset;
5131 return *this;
5132}
5133void ColumnOrder::printTo(std::ostream& out) const {
5134 using ::apache::thrift::to_string;
5135 out << "ColumnOrder(";
5136 out << "TYPE_ORDER="; (__isset.TYPE_ORDER ? (out << to_string(TYPE_ORDER)) : (out << "<null>"));
5137 out << ")";
5138}
5139
5140
5141PageLocation::~PageLocation() throw() {
5142}
5143
5144
5145void PageLocation::__set_offset(const int64_t val) {
5146 this->offset = val;
5147}
5148
5149void PageLocation::__set_compressed_page_size(const int32_t val) {
5150 this->compressed_page_size = val;
5151}
5152
5153void PageLocation::__set_first_row_index(const int64_t val) {
5154 this->first_row_index = val;
5155}
5156std::ostream& operator<<(std::ostream& out, const PageLocation& obj)
5157{
5158 obj.printTo(out);
5159 return out;
5160}
5161
5162
5163uint32_t PageLocation::read(::apache::thrift::protocol::TProtocol* iprot) {
5164
5165 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
5166 uint32_t xfer = 0;
5167 std::string fname;
5168 ::apache::thrift::protocol::TType ftype;
5169 int16_t fid;
5170
5171 xfer += iprot->readStructBegin(fname);
5172
5173 using ::apache::thrift::protocol::TProtocolException;
5174
5175 bool isset_offset = false;
5176 bool isset_compressed_page_size = false;
5177 bool isset_first_row_index = false;
5178
5179 while (true)
5180 {
5181 xfer += iprot->readFieldBegin(fname, ftype, fid);
5182 if (ftype == ::apache::thrift::protocol::T_STOP) {
5183 break;
5184 }
5185 switch (fid)
5186 {
5187 case 1:
5188 if (ftype == ::apache::thrift::protocol::T_I64) {
5189 xfer += iprot->readI64(this->offset);
5190 isset_offset = true;
5191 } else {
5192 xfer += iprot->skip(ftype);
5193 }
5194 break;
5195 case 2:
5196 if (ftype == ::apache::thrift::protocol::T_I32) {
5197 xfer += iprot->readI32(this->compressed_page_size);
5198 isset_compressed_page_size = true;
5199 } else {
5200 xfer += iprot->skip(ftype);
5201 }
5202 break;
5203 case 3:
5204 if (ftype == ::apache::thrift::protocol::T_I64) {
5205 xfer += iprot->readI64(this->first_row_index);
5206 isset_first_row_index = true;
5207 } else {
5208 xfer += iprot->skip(ftype);
5209 }
5210 break;
5211 default:
5212 xfer += iprot->skip(ftype);
5213 break;
5214 }
5215 xfer += iprot->readFieldEnd();
5216 }
5217
5218 xfer += iprot->readStructEnd();
5219
5220 if (!isset_offset)
5221 throw TProtocolException(TProtocolException::INVALID_DATA);
5222 if (!isset_compressed_page_size)
5223 throw TProtocolException(TProtocolException::INVALID_DATA);
5224 if (!isset_first_row_index)
5225 throw TProtocolException(TProtocolException::INVALID_DATA);
5226 return xfer;
5227}
5228
5229uint32_t PageLocation::write(::apache::thrift::protocol::TProtocol* oprot) const {
5230 uint32_t xfer = 0;
5231 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
5232 xfer += oprot->writeStructBegin("PageLocation");
5233
5234 xfer += oprot->writeFieldBegin("offset", ::apache::thrift::protocol::T_I64, 1);
5235 xfer += oprot->writeI64(this->offset);
5236 xfer += oprot->writeFieldEnd();
5237
5238 xfer += oprot->writeFieldBegin("compressed_page_size", ::apache::thrift::protocol::T_I32, 2);
5239 xfer += oprot->writeI32(this->compressed_page_size);
5240 xfer += oprot->writeFieldEnd();
5241
5242 xfer += oprot->writeFieldBegin("first_row_index", ::apache::thrift::protocol::T_I64, 3);
5243 xfer += oprot->writeI64(this->first_row_index);
5244 xfer += oprot->writeFieldEnd();
5245
5246 xfer += oprot->writeFieldStop();
5247 xfer += oprot->writeStructEnd();
5248 return xfer;
5249}
5250
5251void swap(PageLocation &a, PageLocation &b) {
5252 using ::std::swap;
5253 swap(a.offset, b.offset);
5254 swap(a.compressed_page_size, b.compressed_page_size);
5255 swap(a.first_row_index, b.first_row_index);
5256}
5257
5258PageLocation::PageLocation(const PageLocation& other126) {
5259 offset = other126.offset;
5260 compressed_page_size = other126.compressed_page_size;
5261 first_row_index = other126.first_row_index;
5262}
5263PageLocation& PageLocation::operator=(const PageLocation& other127) {
5264 offset = other127.offset;
5265 compressed_page_size = other127.compressed_page_size;
5266 first_row_index = other127.first_row_index;
5267 return *this;
5268}
5269void PageLocation::printTo(std::ostream& out) const {
5270 using ::apache::thrift::to_string;
5271 out << "PageLocation(";
5272 out << "offset=" << to_string(offset);
5273 out << ", " << "compressed_page_size=" << to_string(compressed_page_size);
5274 out << ", " << "first_row_index=" << to_string(first_row_index);
5275 out << ")";
5276}
5277
5278
5279OffsetIndex::~OffsetIndex() throw() {
5280}
5281
5282
5283void OffsetIndex::__set_page_locations(const std::vector<PageLocation> & val) {
5284 this->page_locations = val;
5285}
5286std::ostream& operator<<(std::ostream& out, const OffsetIndex& obj)
5287{
5288 obj.printTo(out);
5289 return out;
5290}
5291
5292
5293uint32_t OffsetIndex::read(::apache::thrift::protocol::TProtocol* iprot) {
5294
5295 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
5296 uint32_t xfer = 0;
5297 std::string fname;
5298 ::apache::thrift::protocol::TType ftype;
5299 int16_t fid;
5300
5301 xfer += iprot->readStructBegin(fname);
5302
5303 using ::apache::thrift::protocol::TProtocolException;
5304
5305 bool isset_page_locations = false;
5306
5307 while (true)
5308 {
5309 xfer += iprot->readFieldBegin(fname, ftype, fid);
5310 if (ftype == ::apache::thrift::protocol::T_STOP) {
5311 break;
5312 }
5313 switch (fid)
5314 {
5315 case 1:
5316 if (ftype == ::apache::thrift::protocol::T_LIST) {
5317 {
5318 this->page_locations.clear();
5319 uint32_t _size128;
5320 ::apache::thrift::protocol::TType _etype131;
5321 xfer += iprot->readListBegin(_etype131, _size128);
5322 this->page_locations.resize(_size128);
5323 uint32_t _i132;
5324 for (_i132 = 0; _i132 < _size128; ++_i132)
5325 {
5326 xfer += this->page_locations[_i132].read(iprot);
5327 }
5328 xfer += iprot->readListEnd();
5329 }
5330 isset_page_locations = true;
5331 } else {
5332 xfer += iprot->skip(ftype);
5333 }
5334 break;
5335 default:
5336 xfer += iprot->skip(ftype);
5337 break;
5338 }
5339 xfer += iprot->readFieldEnd();
5340 }
5341
5342 xfer += iprot->readStructEnd();
5343
5344 if (!isset_page_locations)
5345 throw TProtocolException(TProtocolException::INVALID_DATA);
5346 return xfer;
5347}
5348
5349uint32_t OffsetIndex::write(::apache::thrift::protocol::TProtocol* oprot) const {
5350 uint32_t xfer = 0;
5351 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
5352 xfer += oprot->writeStructBegin("OffsetIndex");
5353
5354 xfer += oprot->writeFieldBegin("page_locations", ::apache::thrift::protocol::T_LIST, 1);
5355 {
5356 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->page_locations.size()));
5357 std::vector<PageLocation> ::const_iterator _iter133;
5358 for (_iter133 = this->page_locations.begin(); _iter133 != this->page_locations.end(); ++_iter133)
5359 {
5360 xfer += (*_iter133).write(oprot);
5361 }
5362 xfer += oprot->writeListEnd();
5363 }
5364 xfer += oprot->writeFieldEnd();
5365
5366 xfer += oprot->writeFieldStop();
5367 xfer += oprot->writeStructEnd();
5368 return xfer;
5369}
5370
5371void swap(OffsetIndex &a, OffsetIndex &b) {
5372 using ::std::swap;
5373 swap(a.page_locations, b.page_locations);
5374}
5375
5376OffsetIndex::OffsetIndex(const OffsetIndex& other134) {
5377 page_locations = other134.page_locations;
5378}
5379OffsetIndex& OffsetIndex::operator=(const OffsetIndex& other135) {
5380 page_locations = other135.page_locations;
5381 return *this;
5382}
5383void OffsetIndex::printTo(std::ostream& out) const {
5384 using ::apache::thrift::to_string;
5385 out << "OffsetIndex(";
5386 out << "page_locations=" << to_string(page_locations);
5387 out << ")";
5388}
5389
5390
5391ColumnIndex::~ColumnIndex() throw() {
5392}
5393
5394
5395void ColumnIndex::__set_null_pages(const std::vector<bool> & val) {
5396 this->null_pages = val;
5397}
5398
5399void ColumnIndex::__set_min_values(const std::vector<std::string> & val) {
5400 this->min_values = val;
5401}
5402
5403void ColumnIndex::__set_max_values(const std::vector<std::string> & val) {
5404 this->max_values = val;
5405}
5406
5407void ColumnIndex::__set_boundary_order(const BoundaryOrder::type val) {
5408 this->boundary_order = val;
5409}
5410
5411void ColumnIndex::__set_null_counts(const std::vector<int64_t> & val) {
5412 this->null_counts = val;
5413__isset.null_counts = true;
5414}
5415std::ostream& operator<<(std::ostream& out, const ColumnIndex& obj)
5416{
5417 obj.printTo(out);
5418 return out;
5419}
5420
5421
5422uint32_t ColumnIndex::read(::apache::thrift::protocol::TProtocol* iprot) {
5423
5424 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
5425 uint32_t xfer = 0;
5426 std::string fname;
5427 ::apache::thrift::protocol::TType ftype;
5428 int16_t fid;
5429
5430 xfer += iprot->readStructBegin(fname);
5431
5432 using ::apache::thrift::protocol::TProtocolException;
5433
5434 bool isset_null_pages = false;
5435 bool isset_min_values = false;
5436 bool isset_max_values = false;
5437 bool isset_boundary_order = false;
5438
5439 while (true)
5440 {
5441 xfer += iprot->readFieldBegin(fname, ftype, fid);
5442 if (ftype == ::apache::thrift::protocol::T_STOP) {
5443 break;
5444 }
5445 switch (fid)
5446 {
5447 case 1:
5448 if (ftype == ::apache::thrift::protocol::T_LIST) {
5449 {
5450 this->null_pages.clear();
5451 uint32_t _size136;
5452 ::apache::thrift::protocol::TType _etype139;
5453 xfer += iprot->readListBegin(_etype139, _size136);
5454 this->null_pages.resize(_size136);
5455 uint32_t _i140;
5456 for (_i140 = 0; _i140 < _size136; ++_i140)
5457 {
5458 xfer += iprot->readBool(this->null_pages[_i140]);
5459 }
5460 xfer += iprot->readListEnd();
5461 }
5462 isset_null_pages = true;
5463 } else {
5464 xfer += iprot->skip(ftype);
5465 }
5466 break;
5467 case 2:
5468 if (ftype == ::apache::thrift::protocol::T_LIST) {
5469 {
5470 this->min_values.clear();
5471 uint32_t _size141;
5472 ::apache::thrift::protocol::TType _etype144;
5473 xfer += iprot->readListBegin(_etype144, _size141);
5474 this->min_values.resize(_size141);
5475 uint32_t _i145;
5476 for (_i145 = 0; _i145 < _size141; ++_i145)
5477 {
5478 xfer += iprot->readBinary(this->min_values[_i145]);
5479 }
5480 xfer += iprot->readListEnd();
5481 }
5482 isset_min_values = true;
5483 } else {
5484 xfer += iprot->skip(ftype);
5485 }
5486 break;
5487 case 3:
5488 if (ftype == ::apache::thrift::protocol::T_LIST) {
5489 {
5490 this->max_values.clear();
5491 uint32_t _size146;
5492 ::apache::thrift::protocol::TType _etype149;
5493 xfer += iprot->readListBegin(_etype149, _size146);
5494 this->max_values.resize(_size146);
5495 uint32_t _i150;
5496 for (_i150 = 0; _i150 < _size146; ++_i150)
5497 {
5498 xfer += iprot->readBinary(this->max_values[_i150]);
5499 }
5500 xfer += iprot->readListEnd();
5501 }
5502 isset_max_values = true;
5503 } else {
5504 xfer += iprot->skip(ftype);
5505 }
5506 break;
5507 case 4:
5508 if (ftype == ::apache::thrift::protocol::T_I32) {
5509 int32_t ecast151;
5510 xfer += iprot->readI32(ecast151);
5511 this->boundary_order = (BoundaryOrder::type)ecast151;
5512 isset_boundary_order = true;
5513 } else {
5514 xfer += iprot->skip(ftype);
5515 }
5516 break;
5517 case 5:
5518 if (ftype == ::apache::thrift::protocol::T_LIST) {
5519 {
5520 this->null_counts.clear();
5521 uint32_t _size152;
5522 ::apache::thrift::protocol::TType _etype155;
5523 xfer += iprot->readListBegin(_etype155, _size152);
5524 this->null_counts.resize(_size152);
5525 uint32_t _i156;
5526 for (_i156 = 0; _i156 < _size152; ++_i156)
5527 {
5528 xfer += iprot->readI64(this->null_counts[_i156]);
5529 }
5530 xfer += iprot->readListEnd();
5531 }
5532 this->__isset.null_counts = true;
5533 } else {
5534 xfer += iprot->skip(ftype);
5535 }
5536 break;
5537 default:
5538 xfer += iprot->skip(ftype);
5539 break;
5540 }
5541 xfer += iprot->readFieldEnd();
5542 }
5543
5544 xfer += iprot->readStructEnd();
5545
5546 if (!isset_null_pages)
5547 throw TProtocolException(TProtocolException::INVALID_DATA);
5548 if (!isset_min_values)
5549 throw TProtocolException(TProtocolException::INVALID_DATA);
5550 if (!isset_max_values)
5551 throw TProtocolException(TProtocolException::INVALID_DATA);
5552 if (!isset_boundary_order)
5553 throw TProtocolException(TProtocolException::INVALID_DATA);
5554 return xfer;
5555}
5556
5557uint32_t ColumnIndex::write(::apache::thrift::protocol::TProtocol* oprot) const {
5558 uint32_t xfer = 0;
5559 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
5560 xfer += oprot->writeStructBegin("ColumnIndex");
5561
5562 xfer += oprot->writeFieldBegin("null_pages", ::apache::thrift::protocol::T_LIST, 1);
5563 {
5564 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_BOOL, static_cast<uint32_t>(this->null_pages.size()));
5565 std::vector<bool> ::const_iterator _iter157;
5566 for (_iter157 = this->null_pages.begin(); _iter157 != this->null_pages.end(); ++_iter157)
5567 {
5568 xfer += oprot->writeBool((*_iter157));
5569 }
5570 xfer += oprot->writeListEnd();
5571 }
5572 xfer += oprot->writeFieldEnd();
5573
5574 xfer += oprot->writeFieldBegin("min_values", ::apache::thrift::protocol::T_LIST, 2);
5575 {
5576 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->min_values.size()));
5577 std::vector<std::string> ::const_iterator _iter158;
5578 for (_iter158 = this->min_values.begin(); _iter158 != this->min_values.end(); ++_iter158)
5579 {
5580 xfer += oprot->writeBinary((*_iter158));
5581 }
5582 xfer += oprot->writeListEnd();
5583 }
5584 xfer += oprot->writeFieldEnd();
5585
5586 xfer += oprot->writeFieldBegin("max_values", ::apache::thrift::protocol::T_LIST, 3);
5587 {
5588 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->max_values.size()));
5589 std::vector<std::string> ::const_iterator _iter159;
5590 for (_iter159 = this->max_values.begin(); _iter159 != this->max_values.end(); ++_iter159)
5591 {
5592 xfer += oprot->writeBinary((*_iter159));
5593 }
5594 xfer += oprot->writeListEnd();
5595 }
5596 xfer += oprot->writeFieldEnd();
5597
5598 xfer += oprot->writeFieldBegin("boundary_order", ::apache::thrift::protocol::T_I32, 4);
5599 xfer += oprot->writeI32((int32_t)this->boundary_order);
5600 xfer += oprot->writeFieldEnd();
5601
5602 if (this->__isset.null_counts) {
5603 xfer += oprot->writeFieldBegin("null_counts", ::apache::thrift::protocol::T_LIST, 5);
5604 {
5605 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I64, static_cast<uint32_t>(this->null_counts.size()));
5606 std::vector<int64_t> ::const_iterator _iter160;
5607 for (_iter160 = this->null_counts.begin(); _iter160 != this->null_counts.end(); ++_iter160)
5608 {
5609 xfer += oprot->writeI64((*_iter160));
5610 }
5611 xfer += oprot->writeListEnd();
5612 }
5613 xfer += oprot->writeFieldEnd();
5614 }
5615 xfer += oprot->writeFieldStop();
5616 xfer += oprot->writeStructEnd();
5617 return xfer;
5618}
5619
5620void swap(ColumnIndex &a, ColumnIndex &b) {
5621 using ::std::swap;
5622 swap(a.null_pages, b.null_pages);
5623 swap(a.min_values, b.min_values);
5624 swap(a.max_values, b.max_values);
5625 swap(a.boundary_order, b.boundary_order);
5626 swap(a.null_counts, b.null_counts);
5627 swap(a.__isset, b.__isset);
5628}
5629
5630ColumnIndex::ColumnIndex(const ColumnIndex& other161) {
5631 null_pages = other161.null_pages;
5632 min_values = other161.min_values;
5633 max_values = other161.max_values;
5634 boundary_order = other161.boundary_order;
5635 null_counts = other161.null_counts;
5636 __isset = other161.__isset;
5637}
5638ColumnIndex& ColumnIndex::operator=(const ColumnIndex& other162) {
5639 null_pages = other162.null_pages;
5640 min_values = other162.min_values;
5641 max_values = other162.max_values;
5642 boundary_order = other162.boundary_order;
5643 null_counts = other162.null_counts;
5644 __isset = other162.__isset;
5645 return *this;
5646}
5647void ColumnIndex::printTo(std::ostream& out) const {
5648 using ::apache::thrift::to_string;
5649 out << "ColumnIndex(";
5650 out << "null_pages=" << to_string(null_pages);
5651 out << ", " << "min_values=" << to_string(min_values);
5652 out << ", " << "max_values=" << to_string(max_values);
5653 out << ", " << "boundary_order=" << to_string(boundary_order);
5654 out << ", " << "null_counts="; (__isset.null_counts ? (out << to_string(null_counts)) : (out << "<null>"));
5655 out << ")";
5656}
5657
5658
5659FileMetaData::~FileMetaData() throw() {
5660}
5661
5662
5663void FileMetaData::__set_version(const int32_t val) {
5664 this->version = val;
5665}
5666
5667void FileMetaData::__set_schema(const std::vector<SchemaElement> & val) {
5668 this->schema = val;
5669}
5670
5671void FileMetaData::__set_num_rows(const int64_t val) {
5672 this->num_rows = val;
5673}
5674
5675void FileMetaData::__set_row_groups(const std::vector<RowGroup> & val) {
5676 this->row_groups = val;
5677}
5678
5679void FileMetaData::__set_key_value_metadata(const std::vector<KeyValue> & val) {
5680 this->key_value_metadata = val;
5681__isset.key_value_metadata = true;
5682}
5683
5684void FileMetaData::__set_created_by(const std::string& val) {
5685 this->created_by = val;
5686__isset.created_by = true;
5687}
5688
5689void FileMetaData::__set_column_orders(const std::vector<ColumnOrder> & val) {
5690 this->column_orders = val;
5691__isset.column_orders = true;
5692}
5693std::ostream& operator<<(std::ostream& out, const FileMetaData& obj)
5694{
5695 obj.printTo(out);
5696 return out;
5697}
5698
5699
5700uint32_t FileMetaData::read(::apache::thrift::protocol::TProtocol* iprot) {
5701
5702 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
5703 uint32_t xfer = 0;
5704 std::string fname;
5705 ::apache::thrift::protocol::TType ftype;
5706 int16_t fid;
5707
5708 xfer += iprot->readStructBegin(fname);
5709
5710 using ::apache::thrift::protocol::TProtocolException;
5711
5712 bool isset_version = false;
5713 bool isset_schema = false;
5714 bool isset_num_rows = false;
5715 bool isset_row_groups = false;
5716
5717 while (true)
5718 {
5719 xfer += iprot->readFieldBegin(fname, ftype, fid);
5720 if (ftype == ::apache::thrift::protocol::T_STOP) {
5721 break;
5722 }
5723 switch (fid)
5724 {
5725 case 1:
5726 if (ftype == ::apache::thrift::protocol::T_I32) {
5727 xfer += iprot->readI32(this->version);
5728 isset_version = true;
5729 } else {
5730 xfer += iprot->skip(ftype);
5731 }
5732 break;
5733 case 2:
5734 if (ftype == ::apache::thrift::protocol::T_LIST) {
5735 {
5736 this->schema.clear();
5737 uint32_t _size163;
5738 ::apache::thrift::protocol::TType _etype166;
5739 xfer += iprot->readListBegin(_etype166, _size163);
5740 this->schema.resize(_size163);
5741 uint32_t _i167;
5742 for (_i167 = 0; _i167 < _size163; ++_i167)
5743 {
5744 xfer += this->schema[_i167].read(iprot);
5745 }
5746 xfer += iprot->readListEnd();
5747 }
5748 isset_schema = true;
5749 } else {
5750 xfer += iprot->skip(ftype);
5751 }
5752 break;
5753 case 3:
5754 if (ftype == ::apache::thrift::protocol::T_I64) {
5755 xfer += iprot->readI64(this->num_rows);
5756 isset_num_rows = true;
5757 } else {
5758 xfer += iprot->skip(ftype);
5759 }
5760 break;
5761 case 4:
5762 if (ftype == ::apache::thrift::protocol::T_LIST) {
5763 {
5764 this->row_groups.clear();
5765 uint32_t _size168;
5766 ::apache::thrift::protocol::TType _etype171;
5767 xfer += iprot->readListBegin(_etype171, _size168);
5768 this->row_groups.resize(_size168);
5769 uint32_t _i172;
5770 for (_i172 = 0; _i172 < _size168; ++_i172)
5771 {
5772 xfer += this->row_groups[_i172].read(iprot);
5773 }
5774 xfer += iprot->readListEnd();
5775 }
5776 isset_row_groups = true;
5777 } else {
5778 xfer += iprot->skip(ftype);
5779 }
5780 break;
5781 case 5:
5782 if (ftype == ::apache::thrift::protocol::T_LIST) {
5783 {
5784 this->key_value_metadata.clear();
5785 uint32_t _size173;
5786 ::apache::thrift::protocol::TType _etype176;
5787 xfer += iprot->readListBegin(_etype176, _size173);
5788 this->key_value_metadata.resize(_size173);
5789 uint32_t _i177;
5790 for (_i177 = 0; _i177 < _size173; ++_i177)
5791 {
5792 xfer += this->key_value_metadata[_i177].read(iprot);
5793 }
5794 xfer += iprot->readListEnd();
5795 }
5796 this->__isset.key_value_metadata = true;
5797 } else {
5798 xfer += iprot->skip(ftype);
5799 }
5800 break;
5801 case 6:
5802 if (ftype == ::apache::thrift::protocol::T_STRING) {
5803 xfer += iprot->readString(this->created_by);
5804 this->__isset.created_by = true;
5805 } else {
5806 xfer += iprot->skip(ftype);
5807 }
5808 break;
5809 case 7:
5810 if (ftype == ::apache::thrift::protocol::T_LIST) {
5811 {
5812 this->column_orders.clear();
5813 uint32_t _size178;
5814 ::apache::thrift::protocol::TType _etype181;
5815 xfer += iprot->readListBegin(_etype181, _size178);
5816 this->column_orders.resize(_size178);
5817 uint32_t _i182;
5818 for (_i182 = 0; _i182 < _size178; ++_i182)
5819 {
5820 xfer += this->column_orders[_i182].read(iprot);
5821 }
5822 xfer += iprot->readListEnd();
5823 }
5824 this->__isset.column_orders = true;
5825 } else {
5826 xfer += iprot->skip(ftype);
5827 }
5828 break;
5829 default:
5830 xfer += iprot->skip(ftype);
5831 break;
5832 }
5833 xfer += iprot->readFieldEnd();
5834 }
5835
5836 xfer += iprot->readStructEnd();
5837
5838 if (!isset_version)
5839 throw TProtocolException(TProtocolException::INVALID_DATA);
5840 if (!isset_schema)
5841 throw TProtocolException(TProtocolException::INVALID_DATA);
5842 if (!isset_num_rows)
5843 throw TProtocolException(TProtocolException::INVALID_DATA);
5844 if (!isset_row_groups)
5845 throw TProtocolException(TProtocolException::INVALID_DATA);
5846 return xfer;
5847}
5848
5849uint32_t FileMetaData::write(::apache::thrift::protocol::TProtocol* oprot) const {
5850 uint32_t xfer = 0;
5851 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
5852 xfer += oprot->writeStructBegin("FileMetaData");
5853
5854 xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_I32, 1);
5855 xfer += oprot->writeI32(this->version);
5856 xfer += oprot->writeFieldEnd();
5857
5858 xfer += oprot->writeFieldBegin("schema", ::apache::thrift::protocol::T_LIST, 2);
5859 {
5860 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->schema.size()));
5861 std::vector<SchemaElement> ::const_iterator _iter183;
5862 for (_iter183 = this->schema.begin(); _iter183 != this->schema.end(); ++_iter183)
5863 {
5864 xfer += (*_iter183).write(oprot);
5865 }
5866 xfer += oprot->writeListEnd();
5867 }
5868 xfer += oprot->writeFieldEnd();
5869
5870 xfer += oprot->writeFieldBegin("num_rows", ::apache::thrift::protocol::T_I64, 3);
5871 xfer += oprot->writeI64(this->num_rows);
5872 xfer += oprot->writeFieldEnd();
5873
5874 xfer += oprot->writeFieldBegin("row_groups", ::apache::thrift::protocol::T_LIST, 4);
5875 {
5876 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->row_groups.size()));
5877 std::vector<RowGroup> ::const_iterator _iter184;
5878 for (_iter184 = this->row_groups.begin(); _iter184 != this->row_groups.end(); ++_iter184)
5879 {
5880 xfer += (*_iter184).write(oprot);
5881 }
5882 xfer += oprot->writeListEnd();
5883 }
5884 xfer += oprot->writeFieldEnd();
5885
5886 if (this->__isset.key_value_metadata) {
5887 xfer += oprot->writeFieldBegin("key_value_metadata", ::apache::thrift::protocol::T_LIST, 5);
5888 {
5889 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->key_value_metadata.size()));
5890 std::vector<KeyValue> ::const_iterator _iter185;
5891 for (_iter185 = this->key_value_metadata.begin(); _iter185 != this->key_value_metadata.end(); ++_iter185)
5892 {
5893 xfer += (*_iter185).write(oprot);
5894 }
5895 xfer += oprot->writeListEnd();
5896 }
5897 xfer += oprot->writeFieldEnd();
5898 }
5899 if (this->__isset.created_by) {
5900 xfer += oprot->writeFieldBegin("created_by", ::apache::thrift::protocol::T_STRING, 6);
5901 xfer += oprot->writeString(this->created_by);
5902 xfer += oprot->writeFieldEnd();
5903 }
5904 if (this->__isset.column_orders) {
5905 xfer += oprot->writeFieldBegin("column_orders", ::apache::thrift::protocol::T_LIST, 7);
5906 {
5907 xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->column_orders.size()));
5908 std::vector<ColumnOrder> ::const_iterator _iter186;
5909 for (_iter186 = this->column_orders.begin(); _iter186 != this->column_orders.end(); ++_iter186)
5910 {
5911 xfer += (*_iter186).write(oprot);
5912 }
5913 xfer += oprot->writeListEnd();
5914 }
5915 xfer += oprot->writeFieldEnd();
5916 }
5917 xfer += oprot->writeFieldStop();
5918 xfer += oprot->writeStructEnd();
5919 return xfer;
5920}
5921
5922void swap(FileMetaData &a, FileMetaData &b) {
5923 using ::std::swap;
5924 swap(a.version, b.version);
5925 swap(a.schema, b.schema);
5926 swap(a.num_rows, b.num_rows);
5927 swap(a.row_groups, b.row_groups);
5928 swap(a.key_value_metadata, b.key_value_metadata);
5929 swap(a.created_by, b.created_by);
5930 swap(a.column_orders, b.column_orders);
5931 swap(a.__isset, b.__isset);
5932}
5933
5934FileMetaData::FileMetaData(const FileMetaData& other187) {
5935 version = other187.version;
5936 schema = other187.schema;
5937 num_rows = other187.num_rows;
5938 row_groups = other187.row_groups;
5939 key_value_metadata = other187.key_value_metadata;
5940 created_by = other187.created_by;
5941 column_orders = other187.column_orders;
5942 __isset = other187.__isset;
5943}
5944FileMetaData& FileMetaData::operator=(const FileMetaData& other188) {
5945 version = other188.version;
5946 schema = other188.schema;
5947 num_rows = other188.num_rows;
5948 row_groups = other188.row_groups;
5949 key_value_metadata = other188.key_value_metadata;
5950 created_by = other188.created_by;
5951 column_orders = other188.column_orders;
5952 __isset = other188.__isset;
5953 return *this;
5954}
5955void FileMetaData::printTo(std::ostream& out) const {
5956 using ::apache::thrift::to_string;
5957 out << "FileMetaData(";
5958 out << "version=" << to_string(version);
5959 out << ", " << "schema=" << to_string(schema);
5960 out << ", " << "num_rows=" << to_string(num_rows);
5961 out << ", " << "row_groups=" << to_string(row_groups);
5962 out << ", " << "key_value_metadata="; (__isset.key_value_metadata ? (out << to_string(key_value_metadata)) : (out << "<null>"));
5963 out << ", " << "created_by="; (__isset.created_by ? (out << to_string(created_by)) : (out << "<null>"));
5964 out << ", " << "column_orders="; (__isset.column_orders ? (out << to_string(column_orders)) : (out << "<null>"));
5965 out << ")";
5966}
5967
5968
5969AesGcmV1::~AesGcmV1() throw() {
5970}
5971
5972
5973void AesGcmV1::__set_aad_metadata(const std::string& val) {
5974 this->aad_metadata = val;
5975__isset.aad_metadata = true;
5976}
5977
5978void AesGcmV1::__set_iv_prefix(const std::string& val) {
5979 this->iv_prefix = val;
5980__isset.iv_prefix = true;
5981}
5982std::ostream& operator<<(std::ostream& out, const AesGcmV1& obj)
5983{
5984 obj.printTo(out);
5985 return out;
5986}
5987
5988
5989uint32_t AesGcmV1::read(::apache::thrift::protocol::TProtocol* iprot) {
5990
5991 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
5992 uint32_t xfer = 0;
5993 std::string fname;
5994 ::apache::thrift::protocol::TType ftype;
5995 int16_t fid;
5996
5997 xfer += iprot->readStructBegin(fname);
5998
5999 using ::apache::thrift::protocol::TProtocolException;
6000
6001
6002 while (true)
6003 {
6004 xfer += iprot->readFieldBegin(fname, ftype, fid);
6005 if (ftype == ::apache::thrift::protocol::T_STOP) {
6006 break;
6007 }
6008 switch (fid)
6009 {
6010 case 1:
6011 if (ftype == ::apache::thrift::protocol::T_STRING) {
6012 xfer += iprot->readBinary(this->aad_metadata);
6013 this->__isset.aad_metadata = true;
6014 } else {
6015 xfer += iprot->skip(ftype);
6016 }
6017 break;
6018 case 2:
6019 if (ftype == ::apache::thrift::protocol::T_STRING) {
6020 xfer += iprot->readBinary(this->iv_prefix);
6021 this->__isset.iv_prefix = true;
6022 } else {
6023 xfer += iprot->skip(ftype);
6024 }
6025 break;
6026 default:
6027 xfer += iprot->skip(ftype);
6028 break;
6029 }
6030 xfer += iprot->readFieldEnd();
6031 }
6032
6033 xfer += iprot->readStructEnd();
6034
6035 return xfer;
6036}
6037
6038uint32_t AesGcmV1::write(::apache::thrift::protocol::TProtocol* oprot) const {
6039 uint32_t xfer = 0;
6040 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
6041 xfer += oprot->writeStructBegin("AesGcmV1");
6042
6043 if (this->__isset.aad_metadata) {
6044 xfer += oprot->writeFieldBegin("aad_metadata", ::apache::thrift::protocol::T_STRING, 1);
6045 xfer += oprot->writeBinary(this->aad_metadata);
6046 xfer += oprot->writeFieldEnd();
6047 }
6048 if (this->__isset.iv_prefix) {
6049 xfer += oprot->writeFieldBegin("iv_prefix", ::apache::thrift::protocol::T_STRING, 2);
6050 xfer += oprot->writeBinary(this->iv_prefix);
6051 xfer += oprot->writeFieldEnd();
6052 }
6053 xfer += oprot->writeFieldStop();
6054 xfer += oprot->writeStructEnd();
6055 return xfer;
6056}
6057
6058void swap(AesGcmV1 &a, AesGcmV1 &b) {
6059 using ::std::swap;
6060 swap(a.aad_metadata, b.aad_metadata);
6061 swap(a.iv_prefix, b.iv_prefix);
6062 swap(a.__isset, b.__isset);
6063}
6064
6065AesGcmV1::AesGcmV1(const AesGcmV1& other189) {
6066 aad_metadata = other189.aad_metadata;
6067 iv_prefix = other189.iv_prefix;
6068 __isset = other189.__isset;
6069}
6070AesGcmV1& AesGcmV1::operator=(const AesGcmV1& other190) {
6071 aad_metadata = other190.aad_metadata;
6072 iv_prefix = other190.iv_prefix;
6073 __isset = other190.__isset;
6074 return *this;
6075}
6076void AesGcmV1::printTo(std::ostream& out) const {
6077 using ::apache::thrift::to_string;
6078 out << "AesGcmV1(";
6079 out << "aad_metadata="; (__isset.aad_metadata ? (out << to_string(aad_metadata)) : (out << "<null>"));
6080 out << ", " << "iv_prefix="; (__isset.iv_prefix ? (out << to_string(iv_prefix)) : (out << "<null>"));
6081 out << ")";
6082}
6083
6084
6085AesGcmCtrV1::~AesGcmCtrV1() throw() {
6086}
6087
6088
6089void AesGcmCtrV1::__set_aad_metadata(const std::string& val) {
6090 this->aad_metadata = val;
6091__isset.aad_metadata = true;
6092}
6093
6094void AesGcmCtrV1::__set_gcm_iv_prefix(const std::string& val) {
6095 this->gcm_iv_prefix = val;
6096__isset.gcm_iv_prefix = true;
6097}
6098
6099void AesGcmCtrV1::__set_ctr_iv_prefix(const std::string& val) {
6100 this->ctr_iv_prefix = val;
6101__isset.ctr_iv_prefix = true;
6102}
6103std::ostream& operator<<(std::ostream& out, const AesGcmCtrV1& obj)
6104{
6105 obj.printTo(out);
6106 return out;
6107}
6108
6109
6110uint32_t AesGcmCtrV1::read(::apache::thrift::protocol::TProtocol* iprot) {
6111
6112 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
6113 uint32_t xfer = 0;
6114 std::string fname;
6115 ::apache::thrift::protocol::TType ftype;
6116 int16_t fid;
6117
6118 xfer += iprot->readStructBegin(fname);
6119
6120 using ::apache::thrift::protocol::TProtocolException;
6121
6122
6123 while (true)
6124 {
6125 xfer += iprot->readFieldBegin(fname, ftype, fid);
6126 if (ftype == ::apache::thrift::protocol::T_STOP) {
6127 break;
6128 }
6129 switch (fid)
6130 {
6131 case 1:
6132 if (ftype == ::apache::thrift::protocol::T_STRING) {
6133 xfer += iprot->readBinary(this->aad_metadata);
6134 this->__isset.aad_metadata = true;
6135 } else {
6136 xfer += iprot->skip(ftype);
6137 }
6138 break;
6139 case 2:
6140 if (ftype == ::apache::thrift::protocol::T_STRING) {
6141 xfer += iprot->readBinary(this->gcm_iv_prefix);
6142 this->__isset.gcm_iv_prefix = true;
6143 } else {
6144 xfer += iprot->skip(ftype);
6145 }
6146 break;
6147 case 3:
6148 if (ftype == ::apache::thrift::protocol::T_STRING) {
6149 xfer += iprot->readBinary(this->ctr_iv_prefix);
6150 this->__isset.ctr_iv_prefix = true;
6151 } else {
6152 xfer += iprot->skip(ftype);
6153 }
6154 break;
6155 default:
6156 xfer += iprot->skip(ftype);
6157 break;
6158 }
6159 xfer += iprot->readFieldEnd();
6160 }
6161
6162 xfer += iprot->readStructEnd();
6163
6164 return xfer;
6165}
6166
6167uint32_t AesGcmCtrV1::write(::apache::thrift::protocol::TProtocol* oprot) const {
6168 uint32_t xfer = 0;
6169 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
6170 xfer += oprot->writeStructBegin("AesGcmCtrV1");
6171
6172 if (this->__isset.aad_metadata) {
6173 xfer += oprot->writeFieldBegin("aad_metadata", ::apache::thrift::protocol::T_STRING, 1);
6174 xfer += oprot->writeBinary(this->aad_metadata);
6175 xfer += oprot->writeFieldEnd();
6176 }
6177 if (this->__isset.gcm_iv_prefix) {
6178 xfer += oprot->writeFieldBegin("gcm_iv_prefix", ::apache::thrift::protocol::T_STRING, 2);
6179 xfer += oprot->writeBinary(this->gcm_iv_prefix);
6180 xfer += oprot->writeFieldEnd();
6181 }
6182 if (this->__isset.ctr_iv_prefix) {
6183 xfer += oprot->writeFieldBegin("ctr_iv_prefix", ::apache::thrift::protocol::T_STRING, 3);
6184 xfer += oprot->writeBinary(this->ctr_iv_prefix);
6185 xfer += oprot->writeFieldEnd();
6186 }
6187 xfer += oprot->writeFieldStop();
6188 xfer += oprot->writeStructEnd();
6189 return xfer;
6190}
6191
6192void swap(AesGcmCtrV1 &a, AesGcmCtrV1 &b) {
6193 using ::std::swap;
6194 swap(a.aad_metadata, b.aad_metadata);
6195 swap(a.gcm_iv_prefix, b.gcm_iv_prefix);
6196 swap(a.ctr_iv_prefix, b.ctr_iv_prefix);
6197 swap(a.__isset, b.__isset);
6198}
6199
6200AesGcmCtrV1::AesGcmCtrV1(const AesGcmCtrV1& other191) {
6201 aad_metadata = other191.aad_metadata;
6202 gcm_iv_prefix = other191.gcm_iv_prefix;
6203 ctr_iv_prefix = other191.ctr_iv_prefix;
6204 __isset = other191.__isset;
6205}
6206AesGcmCtrV1& AesGcmCtrV1::operator=(const AesGcmCtrV1& other192) {
6207 aad_metadata = other192.aad_metadata;
6208 gcm_iv_prefix = other192.gcm_iv_prefix;
6209 ctr_iv_prefix = other192.ctr_iv_prefix;
6210 __isset = other192.__isset;
6211 return *this;
6212}
6213void AesGcmCtrV1::printTo(std::ostream& out) const {
6214 using ::apache::thrift::to_string;
6215 out << "AesGcmCtrV1(";
6216 out << "aad_metadata="; (__isset.aad_metadata ? (out << to_string(aad_metadata)) : (out << "<null>"));
6217 out << ", " << "gcm_iv_prefix="; (__isset.gcm_iv_prefix ? (out << to_string(gcm_iv_prefix)) : (out << "<null>"));
6218 out << ", " << "ctr_iv_prefix="; (__isset.ctr_iv_prefix ? (out << to_string(ctr_iv_prefix)) : (out << "<null>"));
6219 out << ")";
6220}
6221
6222
6223EncryptionAlgorithm::~EncryptionAlgorithm() throw() {
6224}
6225
6226
6227void EncryptionAlgorithm::__set_AES_GCM_V1(const AesGcmV1& val) {
6228 this->AES_GCM_V1 = val;
6229__isset.AES_GCM_V1 = true;
6230}
6231
6232void EncryptionAlgorithm::__set_AES_GCM_CTR_V1(const AesGcmCtrV1& val) {
6233 this->AES_GCM_CTR_V1 = val;
6234__isset.AES_GCM_CTR_V1 = true;
6235}
6236std::ostream& operator<<(std::ostream& out, const EncryptionAlgorithm& obj)
6237{
6238 obj.printTo(out);
6239 return out;
6240}
6241
6242
6243uint32_t EncryptionAlgorithm::read(::apache::thrift::protocol::TProtocol* iprot) {
6244
6245 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
6246 uint32_t xfer = 0;
6247 std::string fname;
6248 ::apache::thrift::protocol::TType ftype;
6249 int16_t fid;
6250
6251 xfer += iprot->readStructBegin(fname);
6252
6253 using ::apache::thrift::protocol::TProtocolException;
6254
6255
6256 while (true)
6257 {
6258 xfer += iprot->readFieldBegin(fname, ftype, fid);
6259 if (ftype == ::apache::thrift::protocol::T_STOP) {
6260 break;
6261 }
6262 switch (fid)
6263 {
6264 case 1:
6265 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
6266 xfer += this->AES_GCM_V1.read(iprot);
6267 this->__isset.AES_GCM_V1 = true;
6268 } else {
6269 xfer += iprot->skip(ftype);
6270 }
6271 break;
6272 case 2:
6273 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
6274 xfer += this->AES_GCM_CTR_V1.read(iprot);
6275 this->__isset.AES_GCM_CTR_V1 = true;
6276 } else {
6277 xfer += iprot->skip(ftype);
6278 }
6279 break;
6280 default:
6281 xfer += iprot->skip(ftype);
6282 break;
6283 }
6284 xfer += iprot->readFieldEnd();
6285 }
6286
6287 xfer += iprot->readStructEnd();
6288
6289 return xfer;
6290}
6291
6292uint32_t EncryptionAlgorithm::write(::apache::thrift::protocol::TProtocol* oprot) const {
6293 uint32_t xfer = 0;
6294 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
6295 xfer += oprot->writeStructBegin("EncryptionAlgorithm");
6296
6297 if (this->__isset.AES_GCM_V1) {
6298 xfer += oprot->writeFieldBegin("AES_GCM_V1", ::apache::thrift::protocol::T_STRUCT, 1);
6299 xfer += this->AES_GCM_V1.write(oprot);
6300 xfer += oprot->writeFieldEnd();
6301 }
6302 if (this->__isset.AES_GCM_CTR_V1) {
6303 xfer += oprot->writeFieldBegin("AES_GCM_CTR_V1", ::apache::thrift::protocol::T_STRUCT, 2);
6304 xfer += this->AES_GCM_CTR_V1.write(oprot);
6305 xfer += oprot->writeFieldEnd();
6306 }
6307 xfer += oprot->writeFieldStop();
6308 xfer += oprot->writeStructEnd();
6309 return xfer;
6310}
6311
6312void swap(EncryptionAlgorithm &a, EncryptionAlgorithm &b) {
6313 using ::std::swap;
6314 swap(a.AES_GCM_V1, b.AES_GCM_V1);
6315 swap(a.AES_GCM_CTR_V1, b.AES_GCM_CTR_V1);
6316 swap(a.__isset, b.__isset);
6317}
6318
6319EncryptionAlgorithm::EncryptionAlgorithm(const EncryptionAlgorithm& other193) {
6320 AES_GCM_V1 = other193.AES_GCM_V1;
6321 AES_GCM_CTR_V1 = other193.AES_GCM_CTR_V1;
6322 __isset = other193.__isset;
6323}
6324EncryptionAlgorithm& EncryptionAlgorithm::operator=(const EncryptionAlgorithm& other194) {
6325 AES_GCM_V1 = other194.AES_GCM_V1;
6326 AES_GCM_CTR_V1 = other194.AES_GCM_CTR_V1;
6327 __isset = other194.__isset;
6328 return *this;
6329}
6330void EncryptionAlgorithm::printTo(std::ostream& out) const {
6331 using ::apache::thrift::to_string;
6332 out << "EncryptionAlgorithm(";
6333 out << "AES_GCM_V1="; (__isset.AES_GCM_V1 ? (out << to_string(AES_GCM_V1)) : (out << "<null>"));
6334 out << ", " << "AES_GCM_CTR_V1="; (__isset.AES_GCM_CTR_V1 ? (out << to_string(AES_GCM_CTR_V1)) : (out << "<null>"));
6335 out << ")";
6336}
6337
6338
6339FileCryptoMetaData::~FileCryptoMetaData() throw() {
6340}
6341
6342
6343void FileCryptoMetaData::__set_encryption_algorithm(const EncryptionAlgorithm& val) {
6344 this->encryption_algorithm = val;
6345}
6346
6347void FileCryptoMetaData::__set_encrypted_footer(const bool val) {
6348 this->encrypted_footer = val;
6349}
6350
6351void FileCryptoMetaData::__set_footer_key_metadata(const std::string& val) {
6352 this->footer_key_metadata = val;
6353__isset.footer_key_metadata = true;
6354}
6355
6356void FileCryptoMetaData::__set_footer_offset(const int64_t val) {
6357 this->footer_offset = val;
6358}
6359std::ostream& operator<<(std::ostream& out, const FileCryptoMetaData& obj)
6360{
6361 obj.printTo(out);
6362 return out;
6363}
6364
6365
6366uint32_t FileCryptoMetaData::read(::apache::thrift::protocol::TProtocol* iprot) {
6367
6368 ::apache::thrift::protocol::TInputRecursionTracker tracker(*iprot);
6369 uint32_t xfer = 0;
6370 std::string fname;
6371 ::apache::thrift::protocol::TType ftype;
6372 int16_t fid;
6373
6374 xfer += iprot->readStructBegin(fname);
6375
6376 using ::apache::thrift::protocol::TProtocolException;
6377
6378 bool isset_encryption_algorithm = false;
6379 bool isset_encrypted_footer = false;
6380 bool isset_footer_offset = false;
6381
6382 while (true)
6383 {
6384 xfer += iprot->readFieldBegin(fname, ftype, fid);
6385 if (ftype == ::apache::thrift::protocol::T_STOP) {
6386 break;
6387 }
6388 switch (fid)
6389 {
6390 case 1:
6391 if (ftype == ::apache::thrift::protocol::T_STRUCT) {
6392 xfer += this->encryption_algorithm.read(iprot);
6393 isset_encryption_algorithm = true;
6394 } else {
6395 xfer += iprot->skip(ftype);
6396 }
6397 break;
6398 case 2:
6399 if (ftype == ::apache::thrift::protocol::T_BOOL) {
6400 xfer += iprot->readBool(this->encrypted_footer);
6401 isset_encrypted_footer = true;
6402 } else {
6403 xfer += iprot->skip(ftype);
6404 }
6405 break;
6406 case 3:
6407 if (ftype == ::apache::thrift::protocol::T_STRING) {
6408 xfer += iprot->readBinary(this->footer_key_metadata);
6409 this->__isset.footer_key_metadata = true;
6410 } else {
6411 xfer += iprot->skip(ftype);
6412 }
6413 break;
6414 case 4:
6415 if (ftype == ::apache::thrift::protocol::T_I64) {
6416 xfer += iprot->readI64(this->footer_offset);
6417 isset_footer_offset = true;
6418 } else {
6419 xfer += iprot->skip(ftype);
6420 }
6421 break;
6422 default:
6423 xfer += iprot->skip(ftype);
6424 break;
6425 }
6426 xfer += iprot->readFieldEnd();
6427 }
6428
6429 xfer += iprot->readStructEnd();
6430
6431 if (!isset_encryption_algorithm)
6432 throw TProtocolException(TProtocolException::INVALID_DATA);
6433 if (!isset_encrypted_footer)
6434 throw TProtocolException(TProtocolException::INVALID_DATA);
6435 if (!isset_footer_offset)
6436 throw TProtocolException(TProtocolException::INVALID_DATA);
6437 return xfer;
6438}
6439
6440uint32_t FileCryptoMetaData::write(::apache::thrift::protocol::TProtocol* oprot) const {
6441 uint32_t xfer = 0;
6442 ::apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot);
6443 xfer += oprot->writeStructBegin("FileCryptoMetaData");
6444
6445 xfer += oprot->writeFieldBegin("encryption_algorithm", ::apache::thrift::protocol::T_STRUCT, 1);
6446 xfer += this->encryption_algorithm.write(oprot);
6447 xfer += oprot->writeFieldEnd();
6448
6449 xfer += oprot->writeFieldBegin("encrypted_footer", ::apache::thrift::protocol::T_BOOL, 2);
6450 xfer += oprot->writeBool(this->encrypted_footer);
6451 xfer += oprot->writeFieldEnd();
6452
6453 if (this->__isset.footer_key_metadata) {
6454 xfer += oprot->writeFieldBegin("footer_key_metadata", ::apache::thrift::protocol::T_STRING, 3);
6455 xfer += oprot->writeBinary(this->footer_key_metadata);
6456 xfer += oprot->writeFieldEnd();
6457 }
6458 xfer += oprot->writeFieldBegin("footer_offset", ::apache::thrift::protocol::T_I64, 4);
6459 xfer += oprot->writeI64(this->footer_offset);
6460 xfer += oprot->writeFieldEnd();
6461
6462 xfer += oprot->writeFieldStop();
6463 xfer += oprot->writeStructEnd();
6464 return xfer;
6465}
6466
6467void swap(FileCryptoMetaData &a, FileCryptoMetaData &b) {
6468 using ::std::swap;
6469 swap(a.encryption_algorithm, b.encryption_algorithm);
6470 swap(a.encrypted_footer, b.encrypted_footer);
6471 swap(a.footer_key_metadata, b.footer_key_metadata);
6472 swap(a.footer_offset, b.footer_offset);
6473 swap(a.__isset, b.__isset);
6474}
6475
6476FileCryptoMetaData::FileCryptoMetaData(const FileCryptoMetaData& other195) {
6477 encryption_algorithm = other195.encryption_algorithm;
6478 encrypted_footer = other195.encrypted_footer;
6479 footer_key_metadata = other195.footer_key_metadata;
6480 footer_offset = other195.footer_offset;
6481 __isset = other195.__isset;
6482}
6483FileCryptoMetaData& FileCryptoMetaData::operator=(const FileCryptoMetaData& other196) {
6484 encryption_algorithm = other196.encryption_algorithm;
6485 encrypted_footer = other196.encrypted_footer;
6486 footer_key_metadata = other196.footer_key_metadata;
6487 footer_offset = other196.footer_offset;
6488 __isset = other196.__isset;
6489 return *this;
6490}
6491void FileCryptoMetaData::printTo(std::ostream& out) const {
6492 using ::apache::thrift::to_string;
6493 out << "FileCryptoMetaData(";
6494 out << "encryption_algorithm=" << to_string(encryption_algorithm);
6495 out << ", " << "encrypted_footer=" << to_string(encrypted_footer);
6496 out << ", " << "footer_key_metadata="; (__isset.footer_key_metadata ? (out << to_string(footer_key_metadata)) : (out << "<null>"));
6497 out << ", " << "footer_offset=" << to_string(footer_offset);
6498 out << ")";
6499}
6500
6501}} // namespace
6502