aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Storages/Distributed/DistributedAsyncInsertSource.h
blob: 35f846151dce3e2e99713f858d258af12d716fc5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once

#include <Processors/ISource.h>
#include <base/types.h>
#include <memory>

namespace DB
{

/// Source for the Distributed engine on-disk file for async INSERT.
class DistributedAsyncInsertSource : public ISource
{
    struct Data;
    explicit DistributedAsyncInsertSource(std::unique_ptr<Data> data);

public:
    explicit DistributedAsyncInsertSource(const String & file_name);
    ~DistributedAsyncInsertSource() override;
    String getName() const override { return "DistributedAsyncInsertSource"; }

protected:
    Chunk generate() override;

private:
    std::unique_ptr<Data> data;
};

}