ClickHouse/dbms/Processors/Sources/SourceFromSingleChunk.h

22 lines
456 B
C++
Raw Normal View History

2019-04-09 14:51:38 +00:00
#pragma once
2020-01-29 14:32:38 +00:00
#include <Processors/Sources/SourceWithProgress.h>
2019-04-09 14:51:38 +00:00
namespace DB
{
2020-01-29 14:32:38 +00:00
class SourceFromSingleChunk : public SourceWithProgress
2019-04-09 14:51:38 +00:00
{
public:
2020-01-29 14:32:38 +00:00
explicit SourceFromSingleChunk(Block header, Chunk chunk_) : SourceWithProgress(std::move(header)), chunk(std::move(chunk_)) {}
2019-04-10 10:52:20 +00:00
String getName() const override { return "SourceFromSingleChunk"; }
2019-04-09 14:51:38 +00:00
protected:
Chunk generate() override { return std::move(chunk); }
private:
Chunk chunk;
};
}