ClickHouse/src/Storages/MergeTree/MergeTreeSource.h

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

43 lines
819 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;
#if defined(OS_LINUX)
2022-11-18 20:09:20 +00:00
int schedule() override;
#endif
2022-11-18 20:09:20 +00:00
protected:
std::optional<Chunk> tryGenerate() override;
void onCancel() override;
private:
MergeTreeSelectAlgorithmPtr algorithm;
#if defined(OS_LINUX)
2022-11-18 20:09:20 +00:00
struct AsyncReadingState;
std::unique_ptr<AsyncReadingState> async_reading_state;
#endif
2022-11-18 20:09:20 +00:00
Chunk processReadResult(ChunkAndProgress chunk);
2022-11-18 20:09:20 +00:00
};
}