Safer ReadBufferFromS3 for merges and backports.

This commit is contained in:
Vladimir Chebotarev 2021-08-04 09:14:20 +03:00
parent c18c16855a
commit c2410920d3
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ public:
const String & bucket_,
const String & key_,
UInt64 max_single_read_retries_,
size_t buffer_size_ = DBMS_DEFAULT_BUFFER_SIZE);
size_t buffer_size_);
bool nextImpl() override;

View File

@ -208,7 +208,8 @@ bool StorageS3Source::initialize()
file_path = fs::path(bucket) / current_key;
read_buf = wrapReadBufferWithCompressionMethod(
std::make_unique<ReadBufferFromS3>(client, bucket, current_key, max_single_read_retries), chooseCompressionMethod(current_key, compression_hint));
std::make_unique<ReadBufferFromS3>(client, bucket, current_key, max_single_read_retries, DBMS_DEFAULT_BUFFER_SIZE),
chooseCompressionMethod(current_key, compression_hint));
auto input_format = FormatFactory::instance().getInput(format, *read_buf, sample_block, getContext(), max_block_size);
pipeline = std::make_unique<QueryPipeline>();
pipeline->init(Pipe(input_format));