ClickHouse/dbms/DataStreams/SquashingBlockInputStream.h

32 lines
697 B
C++
Raw Normal View History

#pragma once
#include <DataStreams/IBlockInputStream.h>
#include <DataStreams/SquashingTransform.h>
namespace DB
{
2016-07-07 01:57:48 +00:00
/** 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,
bool reserve_memory = false);
String getName() const override { return "Squashing"; }
2018-09-09 02:23:24 +00:00
Block getHeader() const override { return header; }
protected:
Block readImpl() override;
private:
2018-09-09 02:23:24 +00:00
Block header;
SquashingTransform transform;
bool all_read = false;
};
}