diff options
author | thegeorg <thegeorg@yandex-team.com> | 2025-01-13 16:56:49 +0300 |
---|---|---|
committer | thegeorg <thegeorg@yandex-team.com> | 2025-01-13 17:22:45 +0300 |
commit | 078756695c71cd8e6c363da2a55bbdeba66c98b7 (patch) | |
tree | 44c7a06a22be29e78d081ddfed0a94341dc39c2f /contrib | |
parent | 35068345b060c5a136cd6dbf1b9b7052ba6751f9 (diff) | |
download | ydb-078756695c71cd8e6c363da2a55bbdeba66c98b7.tar.gz |
Revert some patches from contrib/libs/apache/orc
This was made possible by rXXXXXX.
commit_hash:f534490cc0521f0f710f969f370ddeeb28682e96
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/libs/apache/orc/c++/src/Reader.cc | 6 | ||||
-rw-r--r-- | contrib/libs/apache/orc/c++/src/Statistics.hh | 10 | ||||
-rw-r--r-- | contrib/libs/apache/orc/c++/src/Writer.cc | 12 |
3 files changed, 14 insertions, 14 deletions
diff --git a/contrib/libs/apache/orc/c++/src/Reader.cc b/contrib/libs/apache/orc/c++/src/Reader.cc index 8f96914b94..82e77e4705 100644 --- a/contrib/libs/apache/orc/c++/src/Reader.cc +++ b/contrib/libs/apache/orc/c++/src/Reader.cc @@ -691,7 +691,7 @@ namespace orc { std::string ReaderImpl::getMetadataValue(const std::string& key) const { for (int i = 0; i < footer->metadata_size(); ++i) { - if (footer->metadata(i).name() == TProtobufString(key)) { + if (footer->metadata(i).name() == key) { return footer->metadata(i).value(); } } @@ -741,7 +741,7 @@ namespace orc { bool ReaderImpl::hasMetadataValue(const std::string& key) const { for (int i = 0; i < footer->metadata_size(); ++i) { - if (footer->metadata(i).name() == TProtobufString(key)) { + if (footer->metadata(i).name() == key) { return true; } } @@ -1367,7 +1367,7 @@ namespace orc { if (serializedFooter.length() != 0) { // Parse the file tail from the serialized one. proto::FileTail tail; - if (!tail.ParseFromString(TProtobufString(serializedFooter))) { + if (!tail.ParseFromString(serializedFooter)) { throw ParseError("Failed to parse the file tail from string"); } contents->postscript = std::make_unique<proto::PostScript>(tail.postscript()); diff --git a/contrib/libs/apache/orc/c++/src/Statistics.hh b/contrib/libs/apache/orc/c++/src/Statistics.hh index 94e19417c3..e585bf971c 100644 --- a/contrib/libs/apache/orc/c++/src/Statistics.hh +++ b/contrib/libs/apache/orc/c++/src/Statistics.hh @@ -711,14 +711,14 @@ namespace orc { proto::DecimalStatistics* decStats = pbStats.mutable_decimal_statistics(); if (_stats.hasMinimum()) { - decStats->set_minimum(TProtobufString(_stats.getMinimum().toString(true))); - decStats->set_maximum(TProtobufString(_stats.getMaximum().toString(true))); + decStats->set_minimum(_stats.getMinimum().toString(true)); + decStats->set_maximum(_stats.getMaximum().toString(true)); } else { decStats->clear_minimum(); decStats->clear_maximum(); } if (_stats.hasSum()) { - decStats->set_sum(TProtobufString(_stats.getSum().toString(true))); + decStats->set_sum(_stats.getSum().toString(true)); } else { decStats->clear_sum(); } @@ -1225,8 +1225,8 @@ namespace orc { proto::StringStatistics* strStats = pbStats.mutable_string_statistics(); if (_stats.hasMinimum()) { - strStats->set_minimum(TProtobufString(_stats.getMinimum())); - strStats->set_maximum(TProtobufString(_stats.getMaximum())); + strStats->set_minimum(_stats.getMinimum()); + strStats->set_maximum(_stats.getMaximum()); } else { strStats->clear_minimum(); strStats->clear_maximum(); diff --git a/contrib/libs/apache/orc/c++/src/Writer.cc b/contrib/libs/apache/orc/c++/src/Writer.cc index 8a8044f029..89eb3781cf 100644 --- a/contrib/libs/apache/orc/c++/src/Writer.cc +++ b/contrib/libs/apache/orc/c++/src/Writer.cc @@ -429,8 +429,8 @@ namespace orc { void WriterImpl::addUserMetadata(const std::string& name, const std::string& value) { proto::UserMetadataItem* userMetadataItem = fileFooter.add_metadata(); - userMetadataItem->set_name(TProtobufString(name)); - userMetadataItem->set_value(TProtobufString(value)); + userMetadataItem->set_name(name); + userMetadataItem->set_value(value); } void WriterImpl::init() { @@ -510,7 +510,7 @@ namespace orc { *stripeFooter.add_columns() = encodings[i]; } - stripeFooter.set_writer_timezone(TProtobufString(options.getTimezoneName())); + stripeFooter.set_writer_timezone(options.getTimezoneName()); // add stripe statistics to metadata proto::StripeStatistics* stripeStats = metadata.add_stripe_stats(); @@ -679,8 +679,8 @@ namespace orc { for (auto& key : t.getAttributeKeys()) { const auto& value = t.getAttributeValue(key); auto protoAttr = protoType.add_attributes(); - protoAttr->set_key(TProtobufString(key)); - protoAttr->set_value(TProtobufString(value)); + protoAttr->set_key(key); + protoAttr->set_value(value); } int pos = static_cast<int>(index); @@ -689,7 +689,7 @@ namespace orc { for (uint64_t i = 0; i < t.getSubtypeCount(); ++i) { // only add subtypes' field names if this type is STRUCT if (t.getKind() == STRUCT) { - footer.mutable_types(pos)->add_field_names(TProtobufString(t.getFieldName(i))); + footer.mutable_types(pos)->add_field_names(t.getFieldName(i)); } footer.mutable_types(pos)->add_subtypes(++index); buildFooterType(*t.getSubtype(i), footer, index); |