mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
31 lines
809 B
C++
31 lines
809 B
C++
#pragma once
|
|
|
|
#include <DB/DataStreams/IBlockOutputStream.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/** Преобразует столбцы-константы в полноценные столбцы ("материализует" их).
|
|
*/
|
|
class MaterializingBlockOutputStream : public IBlockOutputStream
|
|
{
|
|
public:
|
|
MaterializingBlockOutputStream(const BlockOutputStreamPtr & output);
|
|
void write(const Block & block) override;
|
|
void flush() override;
|
|
void writePrefix() override;
|
|
void writeSuffix() override;
|
|
void setRowsBeforeLimit(size_t rows_before_limit) override;
|
|
void setTotals(const Block & totals) override;
|
|
void setExtremes(const Block & extremes) override;
|
|
String getContentType() const override;
|
|
|
|
private:
|
|
static Block materialize(const Block & original_block);
|
|
|
|
private:
|
|
BlockOutputStreamPtr output;
|
|
};
|
|
|
|
}
|