mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 03:22:14 +00:00
master merge adjustments
This commit is contained in:
parent
2e124b19b8
commit
45d5e29ba0
@ -207,6 +207,7 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
|
|||||||
std::unique_ptr<WriteBuffer> nested,
|
std::unique_ptr<WriteBuffer> nested,
|
||||||
CompressionMethod method,
|
CompressionMethod method,
|
||||||
int level,
|
int level,
|
||||||
|
int zstd_window_log,
|
||||||
size_t buf_size,
|
size_t buf_size,
|
||||||
char * existing_memory,
|
char * existing_memory,
|
||||||
size_t alignment,
|
size_t alignment,
|
||||||
@ -214,7 +215,7 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
|
|||||||
{
|
{
|
||||||
if (method == CompressionMethod::None)
|
if (method == CompressionMethod::None)
|
||||||
return nested;
|
return nested;
|
||||||
return createWriteCompressedWrapper(nested, method, level, buf_size, existing_memory, alignment, compress_empty);
|
return createWriteCompressedWrapper(nested, method, level, zstd_window_log, buf_size, existing_memory, alignment, compress_empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -222,13 +223,14 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
|
|||||||
WriteBuffer * nested,
|
WriteBuffer * nested,
|
||||||
CompressionMethod method,
|
CompressionMethod method,
|
||||||
int level,
|
int level,
|
||||||
|
int zstd_window_log,
|
||||||
size_t buf_size,
|
size_t buf_size,
|
||||||
char * existing_memory,
|
char * existing_memory,
|
||||||
size_t alignment,
|
size_t alignment,
|
||||||
bool compress_empty)
|
bool compress_empty)
|
||||||
{
|
{
|
||||||
assert(method != CompressionMethod::None);
|
assert(method != CompressionMethod::None);
|
||||||
return createWriteCompressedWrapper(nested, method, level, buf_size, existing_memory, alignment, compress_empty);
|
return createWriteCompressedWrapper(nested, method, level, zstd_window_log, buf_size, existing_memory, alignment, compress_empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@ std::unique_ptr<WriteBuffer> wrapWriteBufferWithCompressionMethod(
|
|||||||
WriteBuffer * nested,
|
WriteBuffer * nested,
|
||||||
CompressionMethod method,
|
CompressionMethod method,
|
||||||
int level,
|
int level,
|
||||||
|
int zstd_window_log,
|
||||||
size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE,
|
size_t buf_size = DBMS_DEFAULT_BUFFER_SIZE,
|
||||||
char * existing_memory = nullptr,
|
char * existing_memory = nullptr,
|
||||||
size_t alignment = 0,
|
size_t alignment = 0,
|
||||||
|
@ -21,7 +21,7 @@ static void setZstdParameter(ZSTD_CCtx * cctx, ZSTD_cParameter param, int value)
|
|||||||
ZSTD_VERSION_STRING);
|
ZSTD_VERSION_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZstdDeflatingWriteBuffer::initialize(int compression_level)
|
void ZstdDeflatingWriteBuffer::initialize(int compression_level, int window_log)
|
||||||
{
|
{
|
||||||
cctx = ZSTD_createCCtx();
|
cctx = ZSTD_createCCtx();
|
||||||
if (cctx == nullptr)
|
if (cctx == nullptr)
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
bool compress_empty_ = true)
|
bool compress_empty_ = true)
|
||||||
: WriteBufferWithOwnMemoryDecorator(std::move(out_), buf_size, existing_memory, alignment), compress_empty(compress_empty_)
|
: WriteBufferWithOwnMemoryDecorator(std::move(out_), buf_size, existing_memory, alignment), compress_empty(compress_empty_)
|
||||||
{
|
{
|
||||||
initialize(compression_level);
|
initialize(compression_level, window_log);
|
||||||
}
|
}
|
||||||
|
|
||||||
~ZstdDeflatingWriteBuffer() override;
|
~ZstdDeflatingWriteBuffer() override;
|
||||||
@ -36,7 +36,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void initialize(int compression_level);
|
void initialize(int compression_level, int window_log);
|
||||||
|
|
||||||
void nextImpl() override;
|
void nextImpl() override;
|
||||||
|
|
||||||
|
@ -642,7 +642,7 @@ void HTTPHandler::processQuery(
|
|||||||
used_output.out_holder.get(),
|
used_output.out_holder.get(),
|
||||||
http_response_compression_method,
|
http_response_compression_method,
|
||||||
static_cast<int>(http_zlib_compression_level),
|
static_cast<int>(http_zlib_compression_level),
|
||||||
DBMS_DEFAULT_BUFFER_SIZE, nullptr, 0, false);
|
0, DBMS_DEFAULT_BUFFER_SIZE, nullptr, 0, false);
|
||||||
used_output.out = used_output.wrap_compressed_holder;
|
used_output.out = used_output.wrap_compressed_holder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user