Skip to content

Commit 258b62d

Browse files
committedOct 24, 2021
Remove one unused CompressedReadBufferFromFile ctor
1 parent 34d8f78 commit 258b62d

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed
 

‎src/Compression/CompressedReadBufferFromFile.cpp

-14
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ CompressedReadBufferFromFile::CompressedReadBufferFromFile(std::unique_ptr<ReadB
5858
}
5959

6060

61-
CompressedReadBufferFromFile::CompressedReadBufferFromFile(
62-
const std::string & path,
63-
const ReadSettings & settings,
64-
size_t estimated_size,
65-
bool allow_different_codecs_)
66-
: BufferWithOwnMemory<ReadBuffer>(0)
67-
, p_file_in(createReadBufferFromFileBase(path, settings, estimated_size))
68-
, file_in(*p_file_in)
69-
{
70-
compressed_in = &file_in;
71-
allow_different_codecs = allow_different_codecs_;
72-
}
73-
74-
7561
void CompressedReadBufferFromFile::seek(size_t offset_in_compressed_file, size_t offset_in_decompressed_block)
7662
{
7763
/// Nothing to do if we already at required position

‎src/Compression/CompressedReadBufferFromFile.h

-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ class CompressedReadBufferFromFile : public CompressedReadBufferBase, public Buf
4747
public:
4848
CompressedReadBufferFromFile(std::unique_ptr<ReadBufferFromFileBase> buf, bool allow_different_codecs_ = false);
4949

50-
CompressedReadBufferFromFile(
51-
const std::string & path, const ReadSettings & settings, size_t estimated_size, bool allow_different_codecs_ = false);
52-
5350
/// Seek is lazy in some sense. We move position in compressed file_in to offset_in_compressed_file, but don't
5451
/// read data into working_buffer and don't shit our position to offset_in_decompressed_block. Instead
5552
/// we store this offset inside nextimpl_working_buffer_offset.

‎utils/check-marks/main.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <IO/ReadBufferFromFile.h>
1111
#include <IO/ReadHelpers.h>
1212
#include <IO/WriteBufferFromFileDescriptor.h>
13+
#include <IO/createReadBufferFromFileBase.h>
1314
#include <Compression/CompressedReadBufferFromFile.h>
1415

1516

@@ -19,7 +20,7 @@
1920
static void checkByCompressedReadBuffer(const std::string & mrk_path, const std::string & bin_path)
2021
{
2122
DB::ReadBufferFromFile mrk_in(mrk_path);
22-
DB::CompressedReadBufferFromFile bin_in(bin_path, {}, 0);
23+
DB::CompressedReadBufferFromFile bin_in(DB::createReadBufferFromFileBase(bin_path, /* settings= */ {}));
2324

2425
DB::WriteBufferFromFileDescriptor out(STDOUT_FILENO);
2526
bool mrk2_format = boost::algorithm::ends_with(mrk_path, ".mrk2");

0 commit comments

Comments
 (0)
Please sign in to comment.