ClickHouse/src/Processors/Formats/PullingOutputFormat.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

47 lines
1.1 KiB
C++
Raw Normal View History

#pragma once
#include <Processors/Formats/IOutputFormat.h>
2021-10-15 20:18:20 +00:00
#include <QueryPipeline/ProfileInfo.h>
namespace DB
{
2023-06-01 17:00:47 +00:00
class WriteBufferFromPointer;
/// Output format which is used in PullingPipelineExecutor.
class PullingOutputFormat : public IOutputFormat
{
public:
2023-06-01 17:00:47 +00:00
PullingOutputFormat(const Block & header, std::atomic_bool & consume_data_flag_);
String getName() const override { return "PullingOutputFormat"; }
Chunk getChunk();
Chunk getTotals();
Chunk getExtremes();
2021-10-15 20:18:20 +00:00
ProfileInfo & getProfileInfo() { return info; }
void setRowsBeforeLimit(size_t rows_before_limit) override;
2021-09-15 19:35:48 +00:00
bool expectMaterializedColumns() const override { return false; }
protected:
void consume(Chunk chunk) override;
void consumeTotals(Chunk chunk) override { totals = std::move(chunk); }
void consumeExtremes(Chunk chunk) override { extremes = std::move(chunk); }
private:
Chunk data;
Chunk totals;
Chunk extremes;
std::atomic_bool & has_data_flag;
2021-10-15 20:18:20 +00:00
ProfileInfo info;
/// Is not used.
2023-06-01 17:00:47 +00:00
static WriteBufferFromPointer out;
};
}