From c0fa2fb6e65bd98a3fc3db7833af10a5741d4dbd Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Thu, 31 Dec 2020 10:08:12 +0300 Subject: [PATCH] compressor: remove extra check for seeking of input --- programs/compressor/Compressor.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/programs/compressor/Compressor.cpp b/programs/compressor/Compressor.cpp index d4b706abf4d..d47372631fe 100644 --- a/programs/compressor/Compressor.cpp +++ b/programs/compressor/Compressor.cpp @@ -169,11 +169,7 @@ int mainEntryClickHouseCompressor(int argc, char ** argv) if (offset_in_compressed_file || offset_in_decompressed_block) { - if (!options.count("input")) - { - throw DB::Exception("--offset-in-compressed-file/--offset-in-decompressed-block requires --input", DB::ErrorCodes::BAD_ARGUMENTS); - } - CompressedReadBufferFromFile compressed_file(options["input"].as(), 0, 0, 0); + CompressedReadBufferFromFile compressed_file(std::move(rb)); compressed_file.seek(offset_in_compressed_file, offset_in_decompressed_block); copyData(compressed_file, *wb); }