mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-14 11:33:46 +00:00
35 lines
706 B
C++
35 lines
706 B
C++
#pragma once
|
|
|
|
#include <DB/DataStreams/IProfilingBlockInputStream.h>
|
|
#include <DB/DataStreams/SquashingTransform.h>
|
|
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Merging consecutive blocks of stream to specified minimum size.
|
|
*/
|
|
class SquashingBlockInputStream : public IProfilingBlockInputStream
|
|
{
|
|
public:
|
|
SquashingBlockInputStream(BlockInputStreamPtr & src, size_t min_block_size_rows, size_t min_block_size_bytes);
|
|
|
|
String getName() const override { return "Squashing"; }
|
|
|
|
String getID() const override
|
|
{
|
|
std::stringstream res;
|
|
res << "Squashing(" << children.at(0)->getID() << ")";
|
|
return res.str();
|
|
}
|
|
|
|
protected:
|
|
Block readImpl() override;
|
|
|
|
private:
|
|
SquashingTransform transform;
|
|
bool all_read = false;
|
|
};
|
|
|
|
}
|