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