mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
31 lines
638 B
C++
31 lines
638 B
C++
#pragma once
|
|
|
|
#include <DataStreams/IBlockInputStream.h>
|
|
#include <DataStreams/SquashingTransform.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Merging consecutive blocks of stream to specified minimum size.
|
|
*/
|
|
class SquashingBlockInputStream : public IBlockInputStream
|
|
{
|
|
public:
|
|
SquashingBlockInputStream(const BlockInputStreamPtr & src, size_t min_block_size_rows, size_t min_block_size_bytes);
|
|
|
|
String getName() const override { return "Squashing"; }
|
|
|
|
Block getHeader() const override { return header; }
|
|
|
|
protected:
|
|
Block readImpl() override;
|
|
|
|
private:
|
|
Block header;
|
|
SquashingTransform transform;
|
|
bool all_read = false;
|
|
};
|
|
|
|
}
|