PARQUET-449: updated to latest parquet.thrift Author: Kashif Rasul <[email protected]> Author: Kashif Rasul <[email protected]>
Closes #21 from kashif/PARQUET-449 and squashes the following commits: 5ebcba6 [Kashif Rasul] get rid of make clean to fix linux compile issue 15294f4 [Kashif Rasul] updated thrift version to 0.9.3 0fb3846 [Kashif Rasul] updated to latest parquet.thrift Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/95277f3a Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/95277f3a Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/95277f3a Branch: refs/heads/master Commit: 95277f3a4188acca8be3d2b828bee18247463295 Parents: 0149a7a Author: Kashif Rasul <[email protected]> Authored: Mon Jan 25 14:23:59 2016 -0800 Committer: Nong Li <[email protected]> Committed: Mon Jan 25 14:23:59 2016 -0800 ---------------------------------------------------------------------- parquet-format/parquet.thrift | 122 ++- src/parquet/thrift/parquet_constants.cpp | 2 +- src/parquet/thrift/parquet_constants.h | 2 +- src/parquet/thrift/parquet_types.cpp | 1311 ++++++++++++++++++++----- src/parquet/thrift/parquet_types.h | 670 ++++++------- thirdparty/build_thirdparty.sh | 2 - thirdparty/versions.sh | 2 +- 7 files changed, 1549 insertions(+), 562 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/95277f3a/parquet-format/parquet.thrift ---------------------------------------------------------------------- diff --git a/parquet-format/parquet.thrift b/parquet-format/parquet.thrift index 52dea7f..7544cf3 100644 --- a/parquet-format/parquet.thrift +++ b/parquet-format/parquet.thrift @@ -9,11 +9,12 @@ * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. */ /** @@ -76,6 +77,90 @@ enum ConvertedType { * 2 digits over). */ DECIMAL = 5; + + /** + * A Date + * + * Stored as days since Unix epoch, encoded as the INT32 physical type. + * + */ + DATE = 6; + + /** + * A time + * + * The total number of milliseconds since midnight. The value is stored + * as an INT32 physical type. + */ + TIME_MILLIS = 7; + // RESERVED = 8; + + /** + * A date/time combination + * + * Date and time recorded as milliseconds since the Unix epoch. Recorded as + * a physical type of INT64. + */ + TIMESTAMP_MILLIS = 9; + // RESERVED = 10; + + + /** + * An unsigned integer value. + * + * The number describes the maximum number of meainful data bits in + * the stored value. 8, 16 and 32 bit values are stored using the + * INT32 physical type. 64 bit values are stored using the INT64 + * physical type. + * + */ + UINT_8 = 11; + UINT_16 = 12; + UINT_32 = 13; + UINT_64 = 14; + + /** + * A signed integer value. + * + * The number describes the maximum number of meainful data bits in + * the stored value. 8, 16 and 32 bit values are stored using the + * INT32 physical type. 64 bit values are stored using the INT64 + * physical type. + * + */ + INT_8 = 15; + INT_16 = 16; + INT_32 = 17; + INT_64 = 18; + + /** + * An embedded JSON document + * + * A JSON document embedded within a single UTF8 column. + */ + JSON = 19; + + /** + * An embedded BSON document + * + * A BSON document embedded within a single BINARY column. + */ + BSON = 20; + + /** + * An interval of time + * + * This type annotates data stored as a FIXED_LEN_BYTE_ARRAY of length 12 + * This data is composed of three separate little endian unsigned + * integers. Each stores a component of a duration of time. The first + * integer identifies the number of months associated with the duration, + * the second identifies the number of days associated with the duration + * and the third identifies the number of milliseconds associated with + * the provided duration. This duration of time is independent of any + * particular timezone or date. + */ + INTERVAL = 21; + } /** @@ -147,6 +232,12 @@ struct SchemaElement { */ 7: optional i32 scale 8: optional i32 precision + + /** When the original schema supports field ids, this will save the + * original field id in the parquet schema + */ + 9: optional i32 field_id; + } /** @@ -339,6 +430,22 @@ struct SortingColumn { } /** + * statistics of a given page type and encoding + */ +struct PageEncodingStats { + + /** the page type (data/dic/...) **/ + 1: required PageType page_type; + + /** encoding of the page **/ + 2: required Encoding encoding; + + /** number of pages of this type with this encoding **/ + 3: required i32 count; + +} + +/** * Description for column metadata */ struct ColumnMetaData { @@ -378,6 +485,11 @@ struct ColumnMetaData { /** optional statistics for this column chunk */ 12: optional Statistics statistics; + + /** Set of all encodings used for pages in this column chunk. + * This information can be used to determine if all data pages are + * dictionary encoded for example **/ + 13: optional list<PageEncodingStats> encoding_stats; } struct ColumnChunk { http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/95277f3a/src/parquet/thrift/parquet_constants.cpp ---------------------------------------------------------------------- diff --git a/src/parquet/thrift/parquet_constants.cpp b/src/parquet/thrift/parquet_constants.cpp index caa5af6..7c616f8 100644 --- a/src/parquet/thrift/parquet_constants.cpp +++ b/src/parquet/thrift/parquet_constants.cpp @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/95277f3a/src/parquet/thrift/parquet_constants.h ---------------------------------------------------------------------- diff --git a/src/parquet/thrift/parquet_constants.h b/src/parquet/thrift/parquet_constants.h index 71d6f58..344c9fe 100644 --- a/src/parquet/thrift/parquet_constants.h +++ b/src/parquet/thrift/parquet_constants.h @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/95277f3a/src/parquet/thrift/parquet_types.cpp ---------------------------------------------------------------------- diff --git a/src/parquet/thrift/parquet_types.cpp b/src/parquet/thrift/parquet_types.cpp index 06d388c..a7a71fc 100644 --- a/src/parquet/thrift/parquet_types.cpp +++ b/src/parquet/thrift/parquet_types.cpp @@ -1,5 +1,5 @@ /** - * Autogenerated by Thrift Compiler (0.9.0) + * Autogenerated by Thrift Compiler (0.9.3) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @@ -7,6 +7,9 @@ #include "parquet_types.h" #include <algorithm> +#include <ostream> + +#include <thrift/TToString.h> namespace parquet { @@ -38,7 +41,21 @@ int _kConvertedTypeValues[] = { ConvertedType::MAP_KEY_VALUE, ConvertedType::LIST, ConvertedType::ENUM, - ConvertedType::DECIMAL + ConvertedType::DECIMAL, + ConvertedType::DATE, + ConvertedType::TIME_MILLIS, + ConvertedType::TIMESTAMP_MILLIS, + ConvertedType::UINT_8, + ConvertedType::UINT_16, + ConvertedType::UINT_32, + ConvertedType::UINT_64, + ConvertedType::INT_8, + ConvertedType::INT_16, + ConvertedType::INT_32, + ConvertedType::INT_64, + ConvertedType::JSON, + ConvertedType::BSON, + ConvertedType::INTERVAL }; const char* _kConvertedTypeNames[] = { "UTF8", @@ -46,9 +63,23 @@ const char* _kConvertedTypeNames[] = { "MAP_KEY_VALUE", "LIST", "ENUM", - "DECIMAL" + "DECIMAL", + "DATE", + "TIME_MILLIS", + "TIMESTAMP_MILLIS", + "UINT_8", + "UINT_16", + "UINT_32", + "UINT_64", + "INT_8", + "INT_16", + "INT_32", + "INT_64", + "JSON", + "BSON", + "INTERVAL" }; -const std::map<int, const char*> _ConvertedType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(6, _kConvertedTypeValues, _kConvertedTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); +const std::map<int, const char*> _ConvertedType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(20, _kConvertedTypeValues, _kConvertedTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); int _kFieldRepetitionTypeValues[] = { FieldRepetitionType::REQUIRED, @@ -112,11 +143,34 @@ const char* _kPageTypeNames[] = { }; const std::map<int, const char*> _PageType_VALUES_TO_NAMES(::apache::thrift::TEnumIterator(4, _kPageTypeValues, _kPageTypeNames), ::apache::thrift::TEnumIterator(-1, NULL, NULL)); -const char* Statistics::ascii_fingerprint = "CE004821871820DD79A8FD98BB101F6D"; -const uint8_t Statistics::binary_fingerprint[16] = {0xCE,0x00,0x48,0x21,0x87,0x18,0x20,0xDD,0x79,0xA8,0xFD,0x98,0xBB,0x10,0x1F,0x6D}; + +Statistics::~Statistics() throw() { +} + + +void Statistics::__set_max(const std::string& val) { + this->max = val; +__isset.max = true; +} + +void Statistics::__set_min(const std::string& val) { + this->min = val; +__isset.min = true; +} + +void Statistics::__set_null_count(const int64_t val) { + this->null_count = val; +__isset.null_count = true; +} + +void Statistics::__set_distinct_count(const int64_t val) { + this->distinct_count = val; +__isset.distinct_count = true; +} uint32_t Statistics::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -181,29 +235,25 @@ uint32_t Statistics::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t Statistics::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("Statistics"); if (this->__isset.max) { - ++fcnt; xfer += oprot->writeFieldBegin("max", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeBinary(this->max); xfer += oprot->writeFieldEnd(); } if (this->__isset.min) { - ++fcnt; xfer += oprot->writeFieldBegin("min", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeBinary(this->min); xfer += oprot->writeFieldEnd(); } if (this->__isset.null_count) { - ++fcnt; xfer += oprot->writeFieldBegin("null_count", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->null_count); xfer += oprot->writeFieldEnd(); } if (this->__isset.distinct_count) { - ++fcnt; xfer += oprot->writeFieldBegin("distinct_count", ::apache::thrift::protocol::T_I64, 4); xfer += oprot->writeI64(this->distinct_count); xfer += oprot->writeFieldEnd(); @@ -222,11 +272,83 @@ void swap(Statistics &a, Statistics &b) { swap(a.__isset, b.__isset); } -const char* SchemaElement::ascii_fingerprint = "388A784401753800444CFEAC8BC1B1A1"; -const uint8_t SchemaElement::binary_fingerprint[16] = {0x38,0x8A,0x78,0x44,0x01,0x75,0x38,0x00,0x44,0x4C,0xFE,0xAC,0x8B,0xC1,0xB1,0xA1}; +Statistics::Statistics(const Statistics& other0) { + max = other0.max; + min = other0.min; + null_count = other0.null_count; + distinct_count = other0.distinct_count; + __isset = other0.__isset; +} +Statistics& Statistics::operator=(const Statistics& other1) { + max = other1.max; + min = other1.min; + null_count = other1.null_count; + distinct_count = other1.distinct_count; + __isset = other1.__isset; + return *this; +} +void Statistics::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "Statistics("; + out << "max="; (__isset.max ? (out << to_string(max)) : (out << "<null>")); + out << ", " << "min="; (__isset.min ? (out << to_string(min)) : (out << "<null>")); + out << ", " << "null_count="; (__isset.null_count ? (out << to_string(null_count)) : (out << "<null>")); + out << ", " << "distinct_count="; (__isset.distinct_count ? (out << to_string(distinct_count)) : (out << "<null>")); + out << ")"; +} + + +SchemaElement::~SchemaElement() throw() { +} + + +void SchemaElement::__set_type(const Type::type val) { + this->type = val; +__isset.type = true; +} + +void SchemaElement::__set_type_length(const int32_t val) { + this->type_length = val; +__isset.type_length = true; +} + +void SchemaElement::__set_repetition_type(const FieldRepetitionType::type val) { + this->repetition_type = val; +__isset.repetition_type = true; +} + +void SchemaElement::__set_name(const std::string& val) { + this->name = val; +} + +void SchemaElement::__set_num_children(const int32_t val) { + this->num_children = val; +__isset.num_children = true; +} + +void SchemaElement::__set_converted_type(const ConvertedType::type val) { + this->converted_type = val; +__isset.converted_type = true; +} + +void SchemaElement::__set_scale(const int32_t val) { + this->scale = val; +__isset.scale = true; +} + +void SchemaElement::__set_precision(const int32_t val) { + this->precision = val; +__isset.precision = true; +} + +void SchemaElement::__set_field_id(const int32_t val) { + this->field_id = val; +__isset.field_id = true; +} uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -248,9 +370,9 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast0; - xfer += iprot->readI32(ecast0); - this->type = (Type::type)ecast0; + int32_t ecast2; + xfer += iprot->readI32(ecast2); + this->type = (Type::type)ecast2; this->__isset.type = true; } else { xfer += iprot->skip(ftype); @@ -266,9 +388,9 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast1; - xfer += iprot->readI32(ecast1); - this->repetition_type = (FieldRepetitionType::type)ecast1; + int32_t ecast3; + xfer += iprot->readI32(ecast3); + this->repetition_type = (FieldRepetitionType::type)ecast3; this->__isset.repetition_type = true; } else { xfer += iprot->skip(ftype); @@ -292,9 +414,9 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 6: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast2; - xfer += iprot->readI32(ecast2); - this->converted_type = (ConvertedType::type)ecast2; + int32_t ecast4; + xfer += iprot->readI32(ecast4); + this->converted_type = (ConvertedType::type)ecast4; this->__isset.converted_type = true; } else { xfer += iprot->skip(ftype); @@ -316,6 +438,14 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; + case 9: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->field_id); + this->__isset.field_id = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -332,56 +462,53 @@ uint32_t SchemaElement::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t SchemaElement::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("SchemaElement"); if (this->__isset.type) { - ++fcnt; xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->type); xfer += oprot->writeFieldEnd(); } if (this->__isset.type_length) { - ++fcnt; xfer += oprot->writeFieldBegin("type_length", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->type_length); xfer += oprot->writeFieldEnd(); } if (this->__isset.repetition_type) { - ++fcnt; xfer += oprot->writeFieldBegin("repetition_type", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->repetition_type); xfer += oprot->writeFieldEnd(); } - ++fcnt; xfer += oprot->writeFieldBegin("name", ::apache::thrift::protocol::T_STRING, 4); xfer += oprot->writeString(this->name); xfer += oprot->writeFieldEnd(); if (this->__isset.num_children) { - ++fcnt; xfer += oprot->writeFieldBegin("num_children", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->num_children); xfer += oprot->writeFieldEnd(); } if (this->__isset.converted_type) { - ++fcnt; xfer += oprot->writeFieldBegin("converted_type", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32((int32_t)this->converted_type); xfer += oprot->writeFieldEnd(); } if (this->__isset.scale) { - ++fcnt; xfer += oprot->writeFieldBegin("scale", ::apache::thrift::protocol::T_I32, 7); xfer += oprot->writeI32(this->scale); xfer += oprot->writeFieldEnd(); } if (this->__isset.precision) { - ++fcnt; xfer += oprot->writeFieldBegin("precision", ::apache::thrift::protocol::T_I32, 8); xfer += oprot->writeI32(this->precision); xfer += oprot->writeFieldEnd(); } + if (this->__isset.field_id) { + xfer += oprot->writeFieldBegin("field_id", ::apache::thrift::protocol::T_I32, 9); + xfer += oprot->writeI32(this->field_id); + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -397,14 +524,79 @@ void swap(SchemaElement &a, SchemaElement &b) { swap(a.converted_type, b.converted_type); swap(a.scale, b.scale); swap(a.precision, b.precision); + swap(a.field_id, b.field_id); swap(a.__isset, b.__isset); } -const char* DataPageHeader::ascii_fingerprint = "5FC1792B0483E9C984475384165040B1"; -const uint8_t DataPageHeader::binary_fingerprint[16] = {0x5F,0xC1,0x79,0x2B,0x04,0x83,0xE9,0xC9,0x84,0x47,0x53,0x84,0x16,0x50,0x40,0xB1}; +SchemaElement::SchemaElement(const SchemaElement& other5) { + type = other5.type; + type_length = other5.type_length; + repetition_type = other5.repetition_type; + name = other5.name; + num_children = other5.num_children; + converted_type = other5.converted_type; + scale = other5.scale; + precision = other5.precision; + field_id = other5.field_id; + __isset = other5.__isset; +} +SchemaElement& SchemaElement::operator=(const SchemaElement& other6) { + type = other6.type; + type_length = other6.type_length; + repetition_type = other6.repetition_type; + name = other6.name; + num_children = other6.num_children; + converted_type = other6.converted_type; + scale = other6.scale; + precision = other6.precision; + field_id = other6.field_id; + __isset = other6.__isset; + return *this; +} +void SchemaElement::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SchemaElement("; + out << "type="; (__isset.type ? (out << to_string(type)) : (out << "<null>")); + out << ", " << "type_length="; (__isset.type_length ? (out << to_string(type_length)) : (out << "<null>")); + out << ", " << "repetition_type="; (__isset.repetition_type ? (out << to_string(repetition_type)) : (out << "<null>")); + out << ", " << "name=" << to_string(name); + out << ", " << "num_children="; (__isset.num_children ? (out << to_string(num_children)) : (out << "<null>")); + out << ", " << "converted_type="; (__isset.converted_type ? (out << to_string(converted_type)) : (out << "<null>")); + out << ", " << "scale="; (__isset.scale ? (out << to_string(scale)) : (out << "<null>")); + out << ", " << "precision="; (__isset.precision ? (out << to_string(precision)) : (out << "<null>")); + out << ", " << "field_id="; (__isset.field_id ? (out << to_string(field_id)) : (out << "<null>")); + out << ")"; +} + + +DataPageHeader::~DataPageHeader() throw() { +} + + +void DataPageHeader::__set_num_values(const int32_t val) { + this->num_values = val; +} + +void DataPageHeader::__set_encoding(const Encoding::type val) { + this->encoding = val; +} + +void DataPageHeader::__set_definition_level_encoding(const Encoding::type val) { + this->definition_level_encoding = val; +} + +void DataPageHeader::__set_repetition_level_encoding(const Encoding::type val) { + this->repetition_level_encoding = val; +} + +void DataPageHeader::__set_statistics(const Statistics& val) { + this->statistics = val; +__isset.statistics = true; +} uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -437,9 +629,9 @@ uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast3; - xfer += iprot->readI32(ecast3); - this->encoding = (Encoding::type)ecast3; + int32_t ecast7; + xfer += iprot->readI32(ecast7); + this->encoding = (Encoding::type)ecast7; isset_encoding = true; } else { xfer += iprot->skip(ftype); @@ -447,9 +639,9 @@ uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 3: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast4; - xfer += iprot->readI32(ecast4); - this->definition_level_encoding = (Encoding::type)ecast4; + int32_t ecast8; + xfer += iprot->readI32(ecast8); + this->definition_level_encoding = (Encoding::type)ecast8; isset_definition_level_encoding = true; } else { xfer += iprot->skip(ftype); @@ -457,9 +649,9 @@ uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast5; - xfer += iprot->readI32(ecast5); - this->repetition_level_encoding = (Encoding::type)ecast5; + int32_t ecast9; + xfer += iprot->readI32(ecast9); + this->repetition_level_encoding = (Encoding::type)ecast9; isset_repetition_level_encoding = true; } else { xfer += iprot->skip(ftype); @@ -495,31 +687,26 @@ uint32_t DataPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t DataPageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("DataPageHeader"); - ++fcnt; xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->num_values); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->encoding); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("definition_level_encoding", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32((int32_t)this->definition_level_encoding); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("repetition_level_encoding", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->repetition_level_encoding); xfer += oprot->writeFieldEnd(); if (this->__isset.statistics) { - ++fcnt; xfer += oprot->writeFieldBegin("statistics", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->statistics.write(oprot); xfer += oprot->writeFieldEnd(); @@ -539,11 +726,42 @@ void swap(DataPageHeader &a, DataPageHeader &b) { swap(a.__isset, b.__isset); } -const char* IndexPageHeader::ascii_fingerprint = "99914B932BD37A50B983C5E7C90AE93B"; -const uint8_t IndexPageHeader::binary_fingerprint[16] = {0x99,0x91,0x4B,0x93,0x2B,0xD3,0x7A,0x50,0xB9,0x83,0xC5,0xE7,0xC9,0x0A,0xE9,0x3B}; +DataPageHeader::DataPageHeader(const DataPageHeader& other10) { + num_values = other10.num_values; + encoding = other10.encoding; + definition_level_encoding = other10.definition_level_encoding; + repetition_level_encoding = other10.repetition_level_encoding; + statistics = other10.statistics; + __isset = other10.__isset; +} +DataPageHeader& DataPageHeader::operator=(const DataPageHeader& other11) { + num_values = other11.num_values; + encoding = other11.encoding; + definition_level_encoding = other11.definition_level_encoding; + repetition_level_encoding = other11.repetition_level_encoding; + statistics = other11.statistics; + __isset = other11.__isset; + return *this; +} +void DataPageHeader::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DataPageHeader("; + out << "num_values=" << to_string(num_values); + out << ", " << "encoding=" << to_string(encoding); + out << ", " << "definition_level_encoding=" << to_string(definition_level_encoding); + out << ", " << "repetition_level_encoding=" << to_string(repetition_level_encoding); + out << ", " << "statistics="; (__isset.statistics ? (out << to_string(statistics)) : (out << "<null>")); + out << ")"; +} + + +IndexPageHeader::~IndexPageHeader() throw() { +} + uint32_t IndexPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -571,7 +789,7 @@ uint32_t IndexPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t IndexPageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("IndexPageHeader"); xfer += oprot->writeFieldStop(); @@ -585,11 +803,40 @@ void swap(IndexPageHeader &a, IndexPageHeader &b) { (void) b; } -const char* DictionaryPageHeader::ascii_fingerprint = "B149E4528254D495610C22AE4BD539C5"; -const uint8_t DictionaryPageHeader::binary_fingerprint[16] = {0xB1,0x49,0xE4,0x52,0x82,0x54,0xD4,0x95,0x61,0x0C,0x22,0xAE,0x4B,0xD5,0x39,0xC5}; +IndexPageHeader::IndexPageHeader(const IndexPageHeader& other12) { + (void) other12; +} +IndexPageHeader& IndexPageHeader::operator=(const IndexPageHeader& other13) { + (void) other13; + return *this; +} +void IndexPageHeader::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "IndexPageHeader("; + out << ")"; +} + + +DictionaryPageHeader::~DictionaryPageHeader() throw() { +} + + +void DictionaryPageHeader::__set_num_values(const int32_t val) { + this->num_values = val; +} + +void DictionaryPageHeader::__set_encoding(const Encoding::type val) { + this->encoding = val; +} + +void DictionaryPageHeader::__set_is_sorted(const bool val) { + this->is_sorted = val; +__isset.is_sorted = true; +} uint32_t DictionaryPageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -620,9 +867,9 @@ uint32_t DictionaryPageHeader::read(::apache::thrift::protocol::TProtocol* iprot break; case 2: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast6; - xfer += iprot->readI32(ecast6); - this->encoding = (Encoding::type)ecast6; + int32_t ecast14; + xfer += iprot->readI32(ecast14); + this->encoding = (Encoding::type)ecast14; isset_encoding = true; } else { xfer += iprot->skip(ftype); @@ -654,21 +901,18 @@ uint32_t DictionaryPageHeader::read(::apache::thrift::protocol::TProtocol* iprot uint32_t DictionaryPageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("DictionaryPageHeader"); - ++fcnt; xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->num_values); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32((int32_t)this->encoding); xfer += oprot->writeFieldEnd(); if (this->__isset.is_sorted) { - ++fcnt; xfer += oprot->writeFieldBegin("is_sorted", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->is_sorted); xfer += oprot->writeFieldEnd(); @@ -686,11 +930,70 @@ void swap(DictionaryPageHeader &a, DictionaryPageHeader &b) { swap(a.__isset, b.__isset); } -const char* DataPageHeaderV2::ascii_fingerprint = "69FF2F6BD1A443440D5E46ABA5A3A919"; -const uint8_t DataPageHeaderV2::binary_fingerprint[16] = {0x69,0xFF,0x2F,0x6B,0xD1,0xA4,0x43,0x44,0x0D,0x5E,0x46,0xAB,0xA5,0xA3,0xA9,0x19}; +DictionaryPageHeader::DictionaryPageHeader(const DictionaryPageHeader& other15) { + num_values = other15.num_values; + encoding = other15.encoding; + is_sorted = other15.is_sorted; + __isset = other15.__isset; +} +DictionaryPageHeader& DictionaryPageHeader::operator=(const DictionaryPageHeader& other16) { + num_values = other16.num_values; + encoding = other16.encoding; + is_sorted = other16.is_sorted; + __isset = other16.__isset; + return *this; +} +void DictionaryPageHeader::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DictionaryPageHeader("; + out << "num_values=" << to_string(num_values); + out << ", " << "encoding=" << to_string(encoding); + out << ", " << "is_sorted="; (__isset.is_sorted ? (out << to_string(is_sorted)) : (out << "<null>")); + out << ")"; +} + + +DataPageHeaderV2::~DataPageHeaderV2() throw() { +} + + +void DataPageHeaderV2::__set_num_values(const int32_t val) { + this->num_values = val; +} + +void DataPageHeaderV2::__set_num_nulls(const int32_t val) { + this->num_nulls = val; +} + +void DataPageHeaderV2::__set_num_rows(const int32_t val) { + this->num_rows = val; +} + +void DataPageHeaderV2::__set_encoding(const Encoding::type val) { + this->encoding = val; +} + +void DataPageHeaderV2::__set_definition_levels_byte_length(const int32_t val) { + this->definition_levels_byte_length = val; +} + +void DataPageHeaderV2::__set_repetition_levels_byte_length(const int32_t val) { + this->repetition_levels_byte_length = val; +} + +void DataPageHeaderV2::__set_is_compressed(const bool val) { + this->is_compressed = val; +__isset.is_compressed = true; +} + +void DataPageHeaderV2::__set_statistics(const Statistics& val) { + this->statistics = val; +__isset.statistics = true; +} uint32_t DataPageHeaderV2::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -741,9 +1044,9 @@ uint32_t DataPageHeaderV2::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast7; - xfer += iprot->readI32(ecast7); - this->encoding = (Encoding::type)ecast7; + int32_t ecast17; + xfer += iprot->readI32(ecast17); + this->encoding = (Encoding::type)ecast17; isset_encoding = true; } else { xfer += iprot->skip(ftype); @@ -807,47 +1110,39 @@ uint32_t DataPageHeaderV2::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t DataPageHeaderV2::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("DataPageHeaderV2"); - ++fcnt; xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->num_values); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("num_nulls", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->num_nulls); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("num_rows", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32(this->num_rows); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->encoding); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("definition_levels_byte_length", ::apache::thrift::protocol::T_I32, 5); xfer += oprot->writeI32(this->definition_levels_byte_length); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("repetition_levels_byte_length", ::apache::thrift::protocol::T_I32, 6); xfer += oprot->writeI32(this->repetition_levels_byte_length); xfer += oprot->writeFieldEnd(); if (this->__isset.is_compressed) { - ++fcnt; xfer += oprot->writeFieldBegin("is_compressed", ::apache::thrift::protocol::T_BOOL, 7); xfer += oprot->writeBool(this->is_compressed); xfer += oprot->writeFieldEnd(); } if (this->__isset.statistics) { - ++fcnt; xfer += oprot->writeFieldBegin("statistics", ::apache::thrift::protocol::T_STRUCT, 8); xfer += this->statistics.write(oprot); xfer += oprot->writeFieldEnd(); @@ -870,11 +1165,88 @@ void swap(DataPageHeaderV2 &a, DataPageHeaderV2 &b) { swap(a.__isset, b.__isset); } -const char* PageHeader::ascii_fingerprint = "B5BD2BDF3756C883A58B30B9C9F204A0"; -const uint8_t PageHeader::binary_fingerprint[16] = {0xB5,0xBD,0x2B,0xDF,0x37,0x56,0xC8,0x83,0xA5,0x8B,0x30,0xB9,0xC9,0xF2,0x04,0xA0}; +DataPageHeaderV2::DataPageHeaderV2(const DataPageHeaderV2& other18) { + num_values = other18.num_values; + num_nulls = other18.num_nulls; + num_rows = other18.num_rows; + encoding = other18.encoding; + definition_levels_byte_length = other18.definition_levels_byte_length; + repetition_levels_byte_length = other18.repetition_levels_byte_length; + is_compressed = other18.is_compressed; + statistics = other18.statistics; + __isset = other18.__isset; +} +DataPageHeaderV2& DataPageHeaderV2::operator=(const DataPageHeaderV2& other19) { + num_values = other19.num_values; + num_nulls = other19.num_nulls; + num_rows = other19.num_rows; + encoding = other19.encoding; + definition_levels_byte_length = other19.definition_levels_byte_length; + repetition_levels_byte_length = other19.repetition_levels_byte_length; + is_compressed = other19.is_compressed; + statistics = other19.statistics; + __isset = other19.__isset; + return *this; +} +void DataPageHeaderV2::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "DataPageHeaderV2("; + out << "num_values=" << to_string(num_values); + out << ", " << "num_nulls=" << to_string(num_nulls); + out << ", " << "num_rows=" << to_string(num_rows); + out << ", " << "encoding=" << to_string(encoding); + out << ", " << "definition_levels_byte_length=" << to_string(definition_levels_byte_length); + out << ", " << "repetition_levels_byte_length=" << to_string(repetition_levels_byte_length); + out << ", " << "is_compressed="; (__isset.is_compressed ? (out << to_string(is_compressed)) : (out << "<null>")); + out << ", " << "statistics="; (__isset.statistics ? (out << to_string(statistics)) : (out << "<null>")); + out << ")"; +} + + +PageHeader::~PageHeader() throw() { +} + + +void PageHeader::__set_type(const PageType::type val) { + this->type = val; +} + +void PageHeader::__set_uncompressed_page_size(const int32_t val) { + this->uncompressed_page_size = val; +} + +void PageHeader::__set_compressed_page_size(const int32_t val) { + this->compressed_page_size = val; +} + +void PageHeader::__set_crc(const int32_t val) { + this->crc = val; +__isset.crc = true; +} + +void PageHeader::__set_data_page_header(const DataPageHeader& val) { + this->data_page_header = val; +__isset.data_page_header = true; +} + +void PageHeader::__set_index_page_header(const IndexPageHeader& val) { + this->index_page_header = val; +__isset.index_page_header = true; +} + +void PageHeader::__set_dictionary_page_header(const DictionaryPageHeader& val) { + this->dictionary_page_header = val; +__isset.dictionary_page_header = true; +} + +void PageHeader::__set_data_page_header_v2(const DataPageHeaderV2& val) { + this->data_page_header_v2 = val; +__isset.data_page_header_v2 = true; +} uint32_t PageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -898,9 +1270,9 @@ uint32_t PageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast8; - xfer += iprot->readI32(ecast8); - this->type = (PageType::type)ecast8; + int32_t ecast20; + xfer += iprot->readI32(ecast20); + this->type = (PageType::type)ecast20; isset_type = true; } else { xfer += iprot->skip(ftype); @@ -982,50 +1354,42 @@ uint32_t PageHeader::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t PageHeader::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("PageHeader"); - ++fcnt; xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->type); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("uncompressed_page_size", ::apache::thrift::protocol::T_I32, 2); xfer += oprot->writeI32(this->uncompressed_page_size); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("compressed_page_size", ::apache::thrift::protocol::T_I32, 3); xfer += oprot->writeI32(this->compressed_page_size); xfer += oprot->writeFieldEnd(); if (this->__isset.crc) { - ++fcnt; xfer += oprot->writeFieldBegin("crc", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32(this->crc); xfer += oprot->writeFieldEnd(); } if (this->__isset.data_page_header) { - ++fcnt; xfer += oprot->writeFieldBegin("data_page_header", ::apache::thrift::protocol::T_STRUCT, 5); xfer += this->data_page_header.write(oprot); xfer += oprot->writeFieldEnd(); } if (this->__isset.index_page_header) { - ++fcnt; xfer += oprot->writeFieldBegin("index_page_header", ::apache::thrift::protocol::T_STRUCT, 6); xfer += this->index_page_header.write(oprot); xfer += oprot->writeFieldEnd(); } if (this->__isset.dictionary_page_header) { - ++fcnt; xfer += oprot->writeFieldBegin("dictionary_page_header", ::apache::thrift::protocol::T_STRUCT, 7); xfer += this->dictionary_page_header.write(oprot); xfer += oprot->writeFieldEnd(); } if (this->__isset.data_page_header_v2) { - ++fcnt; xfer += oprot->writeFieldBegin("data_page_header_v2", ::apache::thrift::protocol::T_STRUCT, 8); xfer += this->data_page_header_v2.write(oprot); xfer += oprot->writeFieldEnd(); @@ -1048,11 +1412,60 @@ void swap(PageHeader &a, PageHeader &b) { swap(a.__isset, b.__isset); } -const char* KeyValue::ascii_fingerprint = "5B708A954C550ECA9C1A49D3C5CAFAB9"; -const uint8_t KeyValue::binary_fingerprint[16] = {0x5B,0x70,0x8A,0x95,0x4C,0x55,0x0E,0xCA,0x9C,0x1A,0x49,0xD3,0xC5,0xCA,0xFA,0xB9}; +PageHeader::PageHeader(const PageHeader& other21) { + type = other21.type; + uncompressed_page_size = other21.uncompressed_page_size; + compressed_page_size = other21.compressed_page_size; + crc = other21.crc; + data_page_header = other21.data_page_header; + index_page_header = other21.index_page_header; + dictionary_page_header = other21.dictionary_page_header; + data_page_header_v2 = other21.data_page_header_v2; + __isset = other21.__isset; +} +PageHeader& PageHeader::operator=(const PageHeader& other22) { + type = other22.type; + uncompressed_page_size = other22.uncompressed_page_size; + compressed_page_size = other22.compressed_page_size; + crc = other22.crc; + data_page_header = other22.data_page_header; + index_page_header = other22.index_page_header; + dictionary_page_header = other22.dictionary_page_header; + data_page_header_v2 = other22.data_page_header_v2; + __isset = other22.__isset; + return *this; +} +void PageHeader::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PageHeader("; + out << "type=" << to_string(type); + out << ", " << "uncompressed_page_size=" << to_string(uncompressed_page_size); + out << ", " << "compressed_page_size=" << to_string(compressed_page_size); + out << ", " << "crc="; (__isset.crc ? (out << to_string(crc)) : (out << "<null>")); + out << ", " << "data_page_header="; (__isset.data_page_header ? (out << to_string(data_page_header)) : (out << "<null>")); + out << ", " << "index_page_header="; (__isset.index_page_header ? (out << to_string(index_page_header)) : (out << "<null>")); + out << ", " << "dictionary_page_header="; (__isset.dictionary_page_header ? (out << to_string(dictionary_page_header)) : (out << "<null>")); + out << ", " << "data_page_header_v2="; (__isset.data_page_header_v2 ? (out << to_string(data_page_header_v2)) : (out << "<null>")); + out << ")"; +} + + +KeyValue::~KeyValue() throw() { +} + + +void KeyValue::__set_key(const std::string& val) { + this->key = val; +} + +void KeyValue::__set_value(const std::string& val) { + this->value = val; +__isset.value = true; +} uint32_t KeyValue::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1104,16 +1517,14 @@ uint32_t KeyValue::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t KeyValue::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("KeyValue"); - ++fcnt; xfer += oprot->writeFieldBegin("key", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->key); xfer += oprot->writeFieldEnd(); if (this->__isset.value) { - ++fcnt; xfer += oprot->writeFieldBegin("value", ::apache::thrift::protocol::T_STRING, 2); xfer += oprot->writeString(this->value); xfer += oprot->writeFieldEnd(); @@ -1130,11 +1541,45 @@ void swap(KeyValue &a, KeyValue &b) { swap(a.__isset, b.__isset); } -const char* SortingColumn::ascii_fingerprint = "F079C2D58A783AD90F9BE05D10DBBC6F"; -const uint8_t SortingColumn::binary_fingerprint[16] = {0xF0,0x79,0xC2,0xD5,0x8A,0x78,0x3A,0xD9,0x0F,0x9B,0xE0,0x5D,0x10,0xDB,0xBC,0x6F}; +KeyValue::KeyValue(const KeyValue& other23) { + key = other23.key; + value = other23.value; + __isset = other23.__isset; +} +KeyValue& KeyValue::operator=(const KeyValue& other24) { + key = other24.key; + value = other24.value; + __isset = other24.__isset; + return *this; +} +void KeyValue::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "KeyValue("; + out << "key=" << to_string(key); + out << ", " << "value="; (__isset.value ? (out << to_string(value)) : (out << "<null>")); + out << ")"; +} + + +SortingColumn::~SortingColumn() throw() { +} + + +void SortingColumn::__set_column_idx(const int32_t val) { + this->column_idx = val; +} + +void SortingColumn::__set_descending(const bool val) { + this->descending = val; +} + +void SortingColumn::__set_nulls_first(const bool val) { + this->nulls_first = val; +} uint32_t SortingColumn::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1200,20 +1645,17 @@ uint32_t SortingColumn::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t SortingColumn::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("SortingColumn"); - ++fcnt; xfer += oprot->writeFieldBegin("column_idx", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->column_idx); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("descending", ::apache::thrift::protocol::T_BOOL, 2); xfer += oprot->writeBool(this->descending); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("nulls_first", ::apache::thrift::protocol::T_BOOL, 3); xfer += oprot->writeBool(this->nulls_first); xfer += oprot->writeFieldEnd(); @@ -1230,11 +1672,227 @@ void swap(SortingColumn &a, SortingColumn &b) { swap(a.nulls_first, b.nulls_first); } -const char* ColumnMetaData::ascii_fingerprint = "1AF797732BCB4465C6314FB29B86638D"; -const uint8_t ColumnMetaData::binary_fingerprint[16] = {0x1A,0xF7,0x97,0x73,0x2B,0xCB,0x44,0x65,0xC6,0x31,0x4F,0xB2,0x9B,0x86,0x63,0x8D}; +SortingColumn::SortingColumn(const SortingColumn& other25) { + column_idx = other25.column_idx; + descending = other25.descending; + nulls_first = other25.nulls_first; +} +SortingColumn& SortingColumn::operator=(const SortingColumn& other26) { + column_idx = other26.column_idx; + descending = other26.descending; + nulls_first = other26.nulls_first; + return *this; +} +void SortingColumn::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "SortingColumn("; + out << "column_idx=" << to_string(column_idx); + out << ", " << "descending=" << to_string(descending); + out << ", " << "nulls_first=" << to_string(nulls_first); + out << ")"; +} + + +PageEncodingStats::~PageEncodingStats() throw() { +} + + +void PageEncodingStats::__set_page_type(const PageType::type val) { + this->page_type = val; +} + +void PageEncodingStats::__set_encoding(const Encoding::type val) { + this->encoding = val; +} + +void PageEncodingStats::__set_count(const int32_t val) { + this->count = val; +} + +uint32_t PageEncodingStats::read(::apache::thrift::protocol::TProtocol* iprot) { + + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); + uint32_t xfer = 0; + std::string fname; + ::apache::thrift::protocol::TType ftype; + int16_t fid; + + xfer += iprot->readStructBegin(fname); + + using ::apache::thrift::protocol::TProtocolException; + + bool isset_page_type = false; + bool isset_encoding = false; + bool isset_count = false; + + while (true) + { + xfer += iprot->readFieldBegin(fname, ftype, fid); + if (ftype == ::apache::thrift::protocol::T_STOP) { + break; + } + switch (fid) + { + case 1: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast27; + xfer += iprot->readI32(ecast27); + this->page_type = (PageType::type)ecast27; + isset_page_type = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 2: + if (ftype == ::apache::thrift::protocol::T_I32) { + int32_t ecast28; + xfer += iprot->readI32(ecast28); + this->encoding = (Encoding::type)ecast28; + isset_encoding = true; + } else { + xfer += iprot->skip(ftype); + } + break; + case 3: + if (ftype == ::apache::thrift::protocol::T_I32) { + xfer += iprot->readI32(this->count); + isset_count = true; + } else { + xfer += iprot->skip(ftype); + } + break; + default: + xfer += iprot->skip(ftype); + break; + } + xfer += iprot->readFieldEnd(); + } + + xfer += iprot->readStructEnd(); + + if (!isset_page_type) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_encoding) + throw TProtocolException(TProtocolException::INVALID_DATA); + if (!isset_count) + throw TProtocolException(TProtocolException::INVALID_DATA); + return xfer; +} + +uint32_t PageEncodingStats::write(::apache::thrift::protocol::TProtocol* oprot) const { + uint32_t xfer = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); + xfer += oprot->writeStructBegin("PageEncodingStats"); + + xfer += oprot->writeFieldBegin("page_type", ::apache::thrift::protocol::T_I32, 1); + xfer += oprot->writeI32((int32_t)this->page_type); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("encoding", ::apache::thrift::protocol::T_I32, 2); + xfer += oprot->writeI32((int32_t)this->encoding); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldBegin("count", ::apache::thrift::protocol::T_I32, 3); + xfer += oprot->writeI32(this->count); + xfer += oprot->writeFieldEnd(); + + xfer += oprot->writeFieldStop(); + xfer += oprot->writeStructEnd(); + return xfer; +} + +void swap(PageEncodingStats &a, PageEncodingStats &b) { + using ::std::swap; + swap(a.page_type, b.page_type); + swap(a.encoding, b.encoding); + swap(a.count, b.count); +} + +PageEncodingStats::PageEncodingStats(const PageEncodingStats& other29) { + page_type = other29.page_type; + encoding = other29.encoding; + count = other29.count; +} +PageEncodingStats& PageEncodingStats::operator=(const PageEncodingStats& other30) { + page_type = other30.page_type; + encoding = other30.encoding; + count = other30.count; + return *this; +} +void PageEncodingStats::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "PageEncodingStats("; + out << "page_type=" << to_string(page_type); + out << ", " << "encoding=" << to_string(encoding); + out << ", " << "count=" << to_string(count); + out << ")"; +} + + +ColumnMetaData::~ColumnMetaData() throw() { +} + + +void ColumnMetaData::__set_type(const Type::type val) { + this->type = val; +} + +void ColumnMetaData::__set_encodings(const std::vector<Encoding::type> & val) { + this->encodings = val; +} + +void ColumnMetaData::__set_path_in_schema(const std::vector<std::string> & val) { + this->path_in_schema = val; +} + +void ColumnMetaData::__set_codec(const CompressionCodec::type val) { + this->codec = val; +} + +void ColumnMetaData::__set_num_values(const int64_t val) { + this->num_values = val; +} + +void ColumnMetaData::__set_total_uncompressed_size(const int64_t val) { + this->total_uncompressed_size = val; +} + +void ColumnMetaData::__set_total_compressed_size(const int64_t val) { + this->total_compressed_size = val; +} + +void ColumnMetaData::__set_key_value_metadata(const std::vector<KeyValue> & val) { + this->key_value_metadata = val; +__isset.key_value_metadata = true; +} + +void ColumnMetaData::__set_data_page_offset(const int64_t val) { + this->data_page_offset = val; +} + +void ColumnMetaData::__set_index_page_offset(const int64_t val) { + this->index_page_offset = val; +__isset.index_page_offset = true; +} + +void ColumnMetaData::__set_dictionary_page_offset(const int64_t val) { + this->dictionary_page_offset = val; +__isset.dictionary_page_offset = true; +} + +void ColumnMetaData::__set_statistics(const Statistics& val) { + this->statistics = val; +__isset.statistics = true; +} + +void ColumnMetaData::__set_encoding_stats(const std::vector<PageEncodingStats> & val) { + this->encoding_stats = val; +__isset.encoding_stats = true; +} uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1263,9 +1921,9 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { { case 1: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast9; - xfer += iprot->readI32(ecast9); - this->type = (Type::type)ecast9; + int32_t ecast31; + xfer += iprot->readI32(ecast31); + this->type = (Type::type)ecast31; isset_type = true; } else { xfer += iprot->skip(ftype); @@ -1275,16 +1933,16 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->encodings.clear(); - uint32_t _size10; - ::apache::thrift::protocol::TType _etype13; - xfer += iprot->readListBegin(_etype13, _size10); - this->encodings.resize(_size10); - uint32_t _i14; - for (_i14 = 0; _i14 < _size10; ++_i14) + uint32_t _size32; + ::apache::thrift::protocol::TType _etype35; + xfer += iprot->readListBegin(_etype35, _size32); + this->encodings.resize(_size32); + uint32_t _i36; + for (_i36 = 0; _i36 < _size32; ++_i36) { - int32_t ecast15; - xfer += iprot->readI32(ecast15); - this->encodings[_i14] = (Encoding::type)ecast15; + int32_t ecast37; + xfer += iprot->readI32(ecast37); + this->encodings[_i36] = (Encoding::type)ecast37; } xfer += iprot->readListEnd(); } @@ -1297,14 +1955,14 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->path_in_schema.clear(); - uint32_t _size16; - ::apache::thrift::protocol::TType _etype19; - xfer += iprot->readListBegin(_etype19, _size16); - this->path_in_schema.resize(_size16); - uint32_t _i20; - for (_i20 = 0; _i20 < _size16; ++_i20) + uint32_t _size38; + ::apache::thrift::protocol::TType _etype41; + xfer += iprot->readListBegin(_etype41, _size38); + this->path_in_schema.resize(_size38); + uint32_t _i42; + for (_i42 = 0; _i42 < _size38; ++_i42) { - xfer += iprot->readString(this->path_in_schema[_i20]); + xfer += iprot->readString(this->path_in_schema[_i42]); } xfer += iprot->readListEnd(); } @@ -1315,9 +1973,9 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { break; case 4: if (ftype == ::apache::thrift::protocol::T_I32) { - int32_t ecast21; - xfer += iprot->readI32(ecast21); - this->codec = (CompressionCodec::type)ecast21; + int32_t ecast43; + xfer += iprot->readI32(ecast43); + this->codec = (CompressionCodec::type)ecast43; isset_codec = true; } else { xfer += iprot->skip(ftype); @@ -1351,14 +2009,14 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->key_value_metadata.clear(); - uint32_t _size22; - ::apache::thrift::protocol::TType _etype25; - xfer += iprot->readListBegin(_etype25, _size22); - this->key_value_metadata.resize(_size22); - uint32_t _i26; - for (_i26 = 0; _i26 < _size22; ++_i26) + uint32_t _size44; + ::apache::thrift::protocol::TType _etype47; + xfer += iprot->readListBegin(_etype47, _size44); + this->key_value_metadata.resize(_size44); + uint32_t _i48; + for (_i48 = 0; _i48 < _size44; ++_i48) { - xfer += this->key_value_metadata[_i26].read(iprot); + xfer += this->key_value_metadata[_i48].read(iprot); } xfer += iprot->readListEnd(); } @@ -1399,6 +2057,26 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { xfer += iprot->skip(ftype); } break; + case 13: + if (ftype == ::apache::thrift::protocol::T_LIST) { + { + this->encoding_stats.clear(); + uint32_t _size49; + ::apache::thrift::protocol::TType _etype52; + xfer += iprot->readListBegin(_etype52, _size49); + this->encoding_stats.resize(_size49); + uint32_t _i53; + for (_i53 = 0; _i53 < _size49; ++_i53) + { + xfer += this->encoding_stats[_i53].read(iprot); + } + xfer += iprot->readListEnd(); + } + this->__isset.encoding_stats = true; + } else { + xfer += iprot->skip(ftype); + } + break; default: xfer += iprot->skip(ftype); break; @@ -1429,97 +2107,98 @@ uint32_t ColumnMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t ColumnMetaData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ColumnMetaData"); - ++fcnt; xfer += oprot->writeFieldBegin("type", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32((int32_t)this->type); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("encodings", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_I32, static_cast<uint32_t>(this->encodings.size())); - std::vector<Encoding::type> ::const_iterator _iter27; - for (_iter27 = this->encodings.begin(); _iter27 != this->encodings.end(); ++_iter27) + std::vector<Encoding::type> ::const_iterator _iter54; + for (_iter54 = this->encodings.begin(); _iter54 != this->encodings.end(); ++_iter54) { - xfer += oprot->writeI32((int32_t)(*_iter27)); + xfer += oprot->writeI32((int32_t)(*_iter54)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("path_in_schema", ::apache::thrift::protocol::T_LIST, 3); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRING, static_cast<uint32_t>(this->path_in_schema.size())); - std::vector<std::string> ::const_iterator _iter28; - for (_iter28 = this->path_in_schema.begin(); _iter28 != this->path_in_schema.end(); ++_iter28) + std::vector<std::string> ::const_iterator _iter55; + for (_iter55 = this->path_in_schema.begin(); _iter55 != this->path_in_schema.end(); ++_iter55) { - xfer += oprot->writeString((*_iter28)); + xfer += oprot->writeString((*_iter55)); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("codec", ::apache::thrift::protocol::T_I32, 4); xfer += oprot->writeI32((int32_t)this->codec); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("num_values", ::apache::thrift::protocol::T_I64, 5); xfer += oprot->writeI64(this->num_values); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("total_uncompressed_size", ::apache::thrift::protocol::T_I64, 6); xfer += oprot->writeI64(this->total_uncompressed_size); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("total_compressed_size", ::apache::thrift::protocol::T_I64, 7); xfer += oprot->writeI64(this->total_compressed_size); xfer += oprot->writeFieldEnd(); if (this->__isset.key_value_metadata) { - ++fcnt; xfer += oprot->writeFieldBegin("key_value_metadata", ::apache::thrift::protocol::T_LIST, 8); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->key_value_metadata.size())); - std::vector<KeyValue> ::const_iterator _iter29; - for (_iter29 = this->key_value_metadata.begin(); _iter29 != this->key_value_metadata.end(); ++_iter29) + std::vector<KeyValue> ::const_iterator _iter56; + for (_iter56 = this->key_value_metadata.begin(); _iter56 != this->key_value_metadata.end(); ++_iter56) { - xfer += (*_iter29).write(oprot); + xfer += (*_iter56).write(oprot); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } - ++fcnt; xfer += oprot->writeFieldBegin("data_page_offset", ::apache::thrift::protocol::T_I64, 9); xfer += oprot->writeI64(this->data_page_offset); xfer += oprot->writeFieldEnd(); if (this->__isset.index_page_offset) { - ++fcnt; xfer += oprot->writeFieldBegin("index_page_offset", ::apache::thrift::protocol::T_I64, 10); xfer += oprot->writeI64(this->index_page_offset); xfer += oprot->writeFieldEnd(); } if (this->__isset.dictionary_page_offset) { - ++fcnt; xfer += oprot->writeFieldBegin("dictionary_page_offset", ::apache::thrift::protocol::T_I64, 11); xfer += oprot->writeI64(this->dictionary_page_offset); xfer += oprot->writeFieldEnd(); } if (this->__isset.statistics) { - ++fcnt; xfer += oprot->writeFieldBegin("statistics", ::apache::thrift::protocol::T_STRUCT, 12); xfer += this->statistics.write(oprot); xfer += oprot->writeFieldEnd(); } + if (this->__isset.encoding_stats) { + xfer += oprot->writeFieldBegin("encoding_stats", ::apache::thrift::protocol::T_LIST, 13); + { + xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->encoding_stats.size())); + std::vector<PageEncodingStats> ::const_iterator _iter57; + for (_iter57 = this->encoding_stats.begin(); _iter57 != this->encoding_stats.end(); ++_iter57) + { + xfer += (*_iter57).write(oprot); + } + xfer += oprot->writeListEnd(); + } + xfer += oprot->writeFieldEnd(); + } xfer += oprot->writeFieldStop(); xfer += oprot->writeStructEnd(); return xfer; @@ -1539,14 +2218,84 @@ void swap(ColumnMetaData &a, ColumnMetaData &b) { swap(a.index_page_offset, b.index_page_offset); swap(a.dictionary_page_offset, b.dictionary_page_offset); swap(a.statistics, b.statistics); + swap(a.encoding_stats, b.encoding_stats); swap(a.__isset, b.__isset); } -const char* ColumnChunk::ascii_fingerprint = "169FC47057EF3D82E2FACDDEC2641AE8"; -const uint8_t ColumnChunk::binary_fingerprint[16] = {0x16,0x9F,0xC4,0x70,0x57,0xEF,0x3D,0x82,0xE2,0xFA,0xCD,0xDE,0xC2,0x64,0x1A,0xE8}; +ColumnMetaData::ColumnMetaData(const ColumnMetaData& other58) { + type = other58.type; + encodings = other58.encodings; + path_in_schema = other58.path_in_schema; + codec = other58.codec; + num_values = other58.num_values; + total_uncompressed_size = other58.total_uncompressed_size; + total_compressed_size = other58.total_compressed_size; + key_value_metadata = other58.key_value_metadata; + data_page_offset = other58.data_page_offset; + index_page_offset = other58.index_page_offset; + dictionary_page_offset = other58.dictionary_page_offset; + statistics = other58.statistics; + encoding_stats = other58.encoding_stats; + __isset = other58.__isset; +} +ColumnMetaData& ColumnMetaData::operator=(const ColumnMetaData& other59) { + type = other59.type; + encodings = other59.encodings; + path_in_schema = other59.path_in_schema; + codec = other59.codec; + num_values = other59.num_values; + total_uncompressed_size = other59.total_uncompressed_size; + total_compressed_size = other59.total_compressed_size; + key_value_metadata = other59.key_value_metadata; + data_page_offset = other59.data_page_offset; + index_page_offset = other59.index_page_offset; + dictionary_page_offset = other59.dictionary_page_offset; + statistics = other59.statistics; + encoding_stats = other59.encoding_stats; + __isset = other59.__isset; + return *this; +} +void ColumnMetaData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ColumnMetaData("; + out << "type=" << to_string(type); + out << ", " << "encodings=" << to_string(encodings); + out << ", " << "path_in_schema=" << to_string(path_in_schema); + out << ", " << "codec=" << to_string(codec); + out << ", " << "num_values=" << to_string(num_values); + out << ", " << "total_uncompressed_size=" << to_string(total_uncompressed_size); + out << ", " << "total_compressed_size=" << to_string(total_compressed_size); + out << ", " << "key_value_metadata="; (__isset.key_value_metadata ? (out << to_string(key_value_metadata)) : (out << "<null>")); + out << ", " << "data_page_offset=" << to_string(data_page_offset); + out << ", " << "index_page_offset="; (__isset.index_page_offset ? (out << to_string(index_page_offset)) : (out << "<null>")); + out << ", " << "dictionary_page_offset="; (__isset.dictionary_page_offset ? (out << to_string(dictionary_page_offset)) : (out << "<null>")); + out << ", " << "statistics="; (__isset.statistics ? (out << to_string(statistics)) : (out << "<null>")); + out << ", " << "encoding_stats="; (__isset.encoding_stats ? (out << to_string(encoding_stats)) : (out << "<null>")); + out << ")"; +} + + +ColumnChunk::~ColumnChunk() throw() { +} + + +void ColumnChunk::__set_file_path(const std::string& val) { + this->file_path = val; +__isset.file_path = true; +} + +void ColumnChunk::__set_file_offset(const int64_t val) { + this->file_offset = val; +} + +void ColumnChunk::__set_meta_data(const ColumnMetaData& val) { + this->meta_data = val; +__isset.meta_data = true; +} uint32_t ColumnChunk::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1606,22 +2355,19 @@ uint32_t ColumnChunk::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t ColumnChunk::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("ColumnChunk"); if (this->__isset.file_path) { - ++fcnt; xfer += oprot->writeFieldBegin("file_path", ::apache::thrift::protocol::T_STRING, 1); xfer += oprot->writeString(this->file_path); xfer += oprot->writeFieldEnd(); } - ++fcnt; xfer += oprot->writeFieldBegin("file_offset", ::apache::thrift::protocol::T_I64, 2); xfer += oprot->writeI64(this->file_offset); xfer += oprot->writeFieldEnd(); if (this->__isset.meta_data) { - ++fcnt; xfer += oprot->writeFieldBegin("meta_data", ::apache::thrift::protocol::T_STRUCT, 3); xfer += this->meta_data.write(oprot); xfer += oprot->writeFieldEnd(); @@ -1639,11 +2385,53 @@ void swap(ColumnChunk &a, ColumnChunk &b) { swap(a.__isset, b.__isset); } -const char* RowGroup::ascii_fingerprint = "DC7968627FA826DDC4C6C9BE773586C9"; -const uint8_t RowGroup::binary_fingerprint[16] = {0xDC,0x79,0x68,0x62,0x7F,0xA8,0x26,0xDD,0xC4,0xC6,0xC9,0xBE,0x77,0x35,0x86,0xC9}; +ColumnChunk::ColumnChunk(const ColumnChunk& other60) { + file_path = other60.file_path; + file_offset = other60.file_offset; + meta_data = other60.meta_data; + __isset = other60.__isset; +} +ColumnChunk& ColumnChunk::operator=(const ColumnChunk& other61) { + file_path = other61.file_path; + file_offset = other61.file_offset; + meta_data = other61.meta_data; + __isset = other61.__isset; + return *this; +} +void ColumnChunk::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "ColumnChunk("; + out << "file_path="; (__isset.file_path ? (out << to_string(file_path)) : (out << "<null>")); + out << ", " << "file_offset=" << to_string(file_offset); + out << ", " << "meta_data="; (__isset.meta_data ? (out << to_string(meta_data)) : (out << "<null>")); + out << ")"; +} + + +RowGroup::~RowGroup() throw() { +} + + +void RowGroup::__set_columns(const std::vector<ColumnChunk> & val) { + this->columns = val; +} + +void RowGroup::__set_total_byte_size(const int64_t val) { + this->total_byte_size = val; +} + +void RowGroup::__set_num_rows(const int64_t val) { + this->num_rows = val; +} + +void RowGroup::__set_sorting_columns(const std::vector<SortingColumn> & val) { + this->sorting_columns = val; +__isset.sorting_columns = true; +} uint32_t RowGroup::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1669,14 +2457,14 @@ uint32_t RowGroup::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->columns.clear(); - uint32_t _size30; - ::apache::thrift::protocol::TType _etype33; - xfer += iprot->readListBegin(_etype33, _size30); - this->columns.resize(_size30); - uint32_t _i34; - for (_i34 = 0; _i34 < _size30; ++_i34) + uint32_t _size62; + ::apache::thrift::protocol::TType _etype65; + xfer += iprot->readListBegin(_etype65, _size62); + this->columns.resize(_size62); + uint32_t _i66; + for (_i66 = 0; _i66 < _size62; ++_i66) { - xfer += this->columns[_i34].read(iprot); + xfer += this->columns[_i66].read(iprot); } xfer += iprot->readListEnd(); } @@ -1705,14 +2493,14 @@ uint32_t RowGroup::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->sorting_columns.clear(); - uint32_t _size35; - ::apache::thrift::protocol::TType _etype38; - xfer += iprot->readListBegin(_etype38, _size35); - this->sorting_columns.resize(_size35); - uint32_t _i39; - for (_i39 = 0; _i39 < _size35; ++_i39) + uint32_t _size67; + ::apache::thrift::protocol::TType _etype70; + xfer += iprot->readListBegin(_etype70, _size67); + this->sorting_columns.resize(_size67); + uint32_t _i71; + for (_i71 = 0; _i71 < _size67; ++_i71) { - xfer += this->sorting_columns[_i39].read(iprot); + xfer += this->sorting_columns[_i71].read(iprot); } xfer += iprot->readListEnd(); } @@ -1741,41 +2529,37 @@ uint32_t RowGroup::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t RowGroup::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("RowGroup"); - ++fcnt; xfer += oprot->writeFieldBegin("columns", ::apache::thrift::protocol::T_LIST, 1); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->columns.size())); - std::vector<ColumnChunk> ::const_iterator _iter40; - for (_iter40 = this->columns.begin(); _iter40 != this->columns.end(); ++_iter40) + std::vector<ColumnChunk> ::const_iterator _iter72; + for (_iter72 = this->columns.begin(); _iter72 != this->columns.end(); ++_iter72) { - xfer += (*_iter40).write(oprot); + xfer += (*_iter72).write(oprot); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("total_byte_size", ::apache::thrift::protocol::T_I64, 2); xfer += oprot->writeI64(this->total_byte_size); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("num_rows", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->num_rows); xfer += oprot->writeFieldEnd(); if (this->__isset.sorting_columns) { - ++fcnt; xfer += oprot->writeFieldBegin("sorting_columns", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->sorting_columns.size())); - std::vector<SortingColumn> ::const_iterator _iter41; - for (_iter41 = this->sorting_columns.begin(); _iter41 != this->sorting_columns.end(); ++_iter41) + std::vector<SortingColumn> ::const_iterator _iter73; + for (_iter73 = this->sorting_columns.begin(); _iter73 != this->sorting_columns.end(); ++_iter73) { - xfer += (*_iter41).write(oprot); + xfer += (*_iter73).write(oprot); } xfer += oprot->writeListEnd(); } @@ -1795,11 +2579,65 @@ void swap(RowGroup &a, RowGroup &b) { swap(a.__isset, b.__isset); } -const char* FileMetaData::ascii_fingerprint = "44DC7D83A66D54A7B7892A985C4125C9"; -const uint8_t FileMetaData::binary_fingerprint[16] = {0x44,0xDC,0x7D,0x83,0xA6,0x6D,0x54,0xA7,0xB7,0x89,0x2A,0x98,0x5C,0x41,0x25,0xC9}; +RowGroup::RowGroup(const RowGroup& other74) { + columns = other74.columns; + total_byte_size = other74.total_byte_size; + num_rows = other74.num_rows; + sorting_columns = other74.sorting_columns; + __isset = other74.__isset; +} +RowGroup& RowGroup::operator=(const RowGroup& other75) { + columns = other75.columns; + total_byte_size = other75.total_byte_size; + num_rows = other75.num_rows; + sorting_columns = other75.sorting_columns; + __isset = other75.__isset; + return *this; +} +void RowGroup::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "RowGroup("; + out << "columns=" << to_string(columns); + out << ", " << "total_byte_size=" << to_string(total_byte_size); + out << ", " << "num_rows=" << to_string(num_rows); + out << ", " << "sorting_columns="; (__isset.sorting_columns ? (out << to_string(sorting_columns)) : (out << "<null>")); + out << ")"; +} + + +FileMetaData::~FileMetaData() throw() { +} + + +void FileMetaData::__set_version(const int32_t val) { + this->version = val; +} + +void FileMetaData::__set_schema(const std::vector<SchemaElement> & val) { + this->schema = val; +} + +void FileMetaData::__set_num_rows(const int64_t val) { + this->num_rows = val; +} + +void FileMetaData::__set_row_groups(const std::vector<RowGroup> & val) { + this->row_groups = val; +} + +void FileMetaData::__set_key_value_metadata(const std::vector<KeyValue> & val) { + this->key_value_metadata = val; +__isset.key_value_metadata = true; +} + +void FileMetaData::__set_created_by(const std::string& val) { + this->created_by = val; +__isset.created_by = true; +} uint32_t FileMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { + apache::thrift::protocol::TInputRecursionTracker tracker(*iprot); uint32_t xfer = 0; std::string fname; ::apache::thrift::protocol::TType ftype; @@ -1834,14 +2672,14 @@ uint32_t FileMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->schema.clear(); - uint32_t _size42; - ::apache::thrift::protocol::TType _etype45; - xfer += iprot->readListBegin(_etype45, _size42); - this->schema.resize(_size42); - uint32_t _i46; - for (_i46 = 0; _i46 < _size42; ++_i46) + uint32_t _size76; + ::apache::thrift::protocol::TType _etype79; + xfer += iprot->readListBegin(_etype79, _size76); + this->schema.resize(_size76); + uint32_t _i80; + for (_i80 = 0; _i80 < _size76; ++_i80) { - xfer += this->schema[_i46].read(iprot); + xfer += this->schema[_i80].read(iprot); } xfer += iprot->readListEnd(); } @@ -1862,14 +2700,14 @@ uint32_t FileMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->row_groups.clear(); - uint32_t _size47; - ::apache::thrift::protocol::TType _etype50; - xfer += iprot->readListBegin(_etype50, _size47); - this->row_groups.resize(_size47); - uint32_t _i51; - for (_i51 = 0; _i51 < _size47; ++_i51) + uint32_t _size81; + ::apache::thrift::protocol::TType _etype84; + xfer += iprot->readListBegin(_etype84, _size81); + this->row_groups.resize(_size81); + uint32_t _i85; + for (_i85 = 0; _i85 < _size81; ++_i85) { - xfer += this->row_groups[_i51].read(iprot); + xfer += this->row_groups[_i85].read(iprot); } xfer += iprot->readListEnd(); } @@ -1882,14 +2720,14 @@ uint32_t FileMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { if (ftype == ::apache::thrift::protocol::T_LIST) { { this->key_value_metadata.clear(); - uint32_t _size52; - ::apache::thrift::protocol::TType _etype55; - xfer += iprot->readListBegin(_etype55, _size52); - this->key_value_metadata.resize(_size52); - uint32_t _i56; - for (_i56 = 0; _i56 < _size52; ++_i56) + uint32_t _size86; + ::apache::thrift::protocol::TType _etype89; + xfer += iprot->readListBegin(_etype89, _size86); + this->key_value_metadata.resize(_size86); + uint32_t _i90; + for (_i90 = 0; _i90 < _size86; ++_i90) { - xfer += this->key_value_metadata[_i56].read(iprot); + xfer += this->key_value_metadata[_i90].read(iprot); } xfer += iprot->readListEnd(); } @@ -1928,61 +2766,55 @@ uint32_t FileMetaData::read(::apache::thrift::protocol::TProtocol* iprot) { uint32_t FileMetaData::write(::apache::thrift::protocol::TProtocol* oprot) const { uint32_t xfer = 0; - uint32_t fcnt = 0; + apache::thrift::protocol::TOutputRecursionTracker tracker(*oprot); xfer += oprot->writeStructBegin("FileMetaData"); - ++fcnt; xfer += oprot->writeFieldBegin("version", ::apache::thrift::protocol::T_I32, 1); xfer += oprot->writeI32(this->version); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("schema", ::apache::thrift::protocol::T_LIST, 2); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->schema.size())); - std::vector<SchemaElement> ::const_iterator _iter57; - for (_iter57 = this->schema.begin(); _iter57 != this->schema.end(); ++_iter57) + std::vector<SchemaElement> ::const_iterator _iter91; + for (_iter91 = this->schema.begin(); _iter91 != this->schema.end(); ++_iter91) { - xfer += (*_iter57).write(oprot); + xfer += (*_iter91).write(oprot); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("num_rows", ::apache::thrift::protocol::T_I64, 3); xfer += oprot->writeI64(this->num_rows); xfer += oprot->writeFieldEnd(); - ++fcnt; xfer += oprot->writeFieldBegin("row_groups", ::apache::thrift::protocol::T_LIST, 4); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->row_groups.size())); - std::vector<RowGroup> ::const_iterator _iter58; - for (_iter58 = this->row_groups.begin(); _iter58 != this->row_groups.end(); ++_iter58) + std::vector<RowGroup> ::const_iterator _iter92; + for (_iter92 = this->row_groups.begin(); _iter92 != this->row_groups.end(); ++_iter92) { - xfer += (*_iter58).write(oprot); + xfer += (*_iter92).write(oprot); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); if (this->__isset.key_value_metadata) { - ++fcnt; xfer += oprot->writeFieldBegin("key_value_metadata", ::apache::thrift::protocol::T_LIST, 5); { xfer += oprot->writeListBegin(::apache::thrift::protocol::T_STRUCT, static_cast<uint32_t>(this->key_value_metadata.size())); - std::vector<KeyValue> ::const_iterator _iter59; - for (_iter59 = this->key_value_metadata.begin(); _iter59 != this->key_value_metadata.end(); ++_iter59) + std::vector<KeyValue> ::const_iterator _iter93; + for (_iter93 = this->key_value_metadata.begin(); _iter93 != this->key_value_metadata.end(); ++_iter93) { - xfer += (*_iter59).write(oprot); + xfer += (*_iter93).write(oprot); } xfer += oprot->writeListEnd(); } xfer += oprot->writeFieldEnd(); } if (this->__isset.created_by) { - ++fcnt; xfer += oprot->writeFieldBegin("created_by", ::apache::thrift::protocol::T_STRING, 6); xfer += oprot->writeString(this->created_by); xfer += oprot->writeFieldEnd(); @@ -2003,4 +2835,35 @@ void swap(FileMetaData &a, FileMetaData &b) { swap(a.__isset, b.__isset); } +FileMetaData::FileMetaData(const FileMetaData& other94) { + version = other94.version; + schema = other94.schema; + num_rows = other94.num_rows; + row_groups = other94.row_groups; + key_value_metadata = other94.key_value_metadata; + created_by = other94.created_by; + __isset = other94.__isset; +} +FileMetaData& FileMetaData::operator=(const FileMetaData& other95) { + version = other95.version; + schema = other95.schema; + num_rows = other95.num_rows; + row_groups = other95.row_groups; + key_value_metadata = other95.key_value_metadata; + created_by = other95.created_by; + __isset = other95.__isset; + return *this; +} +void FileMetaData::printTo(std::ostream& out) const { + using ::apache::thrift::to_string; + out << "FileMetaData("; + out << "version=" << to_string(version); + out << ", " << "schema=" << to_string(schema); + out << ", " << "num_rows=" << to_string(num_rows); + out << ", " << "row_groups=" << to_string(row_groups); + out << ", " << "key_value_metadata="; (__isset.key_value_metadata ? (out << to_string(key_value_metadata)) : (out << "<null>")); + out << ", " << "created_by="; (__isset.created_by ? (out << to_string(created_by)) : (out << "<null>")); + out << ")"; +} + } // namespace
