ClickHouse/src/Storages/MergeTree/MergeTreeSource.h

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

38 lines
772 B
C++
Raw Normal View History

2022-11-18 20:09:20 +00:00
#pragma once
#include <Processors/ISource.h>
namespace DB
{
class IMergeTreeSelectAlgorithm;
using MergeTreeSelectAlgorithmPtr = std::unique_ptr<IMergeTreeSelectAlgorithm>;
struct ChunkAndProgress;
class MergeTreeSource final : public ISource
{
public:
explicit MergeTreeSource(MergeTreeSelectAlgorithmPtr algorithm_);
~MergeTreeSource() override;
std::string getName() const override;
Status prepare() override;
int schedule() override;
protected:
std::optional<Chunk> tryGenerate() override;
void onCancel() override;
private:
MergeTreeSelectAlgorithmPtr algorithm;
struct AsyncReadingState;
std::unique_ptr<AsyncReadingState> async_reading_state;
std::optional<Chunk> reportProgress(ChunkAndProgress chunk);
};
}