Skip to content

Commit ac7088d

Browse files
Update src/Processors/Formats/Impl/Parquet/ThriftUtil.cpp
Co-authored-by: Michael Kolupaev <[email protected]>
1 parent 5bfe887 commit ac7088d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Processors/Formats/Impl/Parquet/ThriftUtil.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ size_t deserializeThriftStruct(T & out, const char * buf, size_t limit)
4848

4949
/// Set max message size to avoid 'apache::thrift::transport::TTransportException: MaxMessageSize reached' on big files
5050
/// Similar to https://github.com/ClickHouse/arrow/blob/5cfccd8ea65f33d4517e7409815d761c7650b45d/cpp/src/parquet/thrift_internal.h#L437
51-
auto configuration = std::make_shared<apache::thrift::TConfiguration>();
52-
configuration->setMaxMessageSize(std::numeric_limits<int>::max());
51+
static auto configuration = std::make_shared<apache::thrift::TConfiguration>(/*maxMessageSize=*/ std::numeric_limits<int>::max());
5352

5453
auto trans = std::make_shared<apache::thrift::transport::TMemoryBuffer>(cast_buf, uint32_t(limit), apache::thrift::transport::TMemoryBuffer::OBSERVE, configuration);
5554
apache::thrift::protocol::TCompactProtocolT<apache::thrift::transport::TMemoryBuffer> proto(trans);

0 commit comments

Comments
 (0)