aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Processors/Sources/TemporaryFileLazySource.h
blob: 9bd3b5f6c3f00202e2793889766b3a1edf2ba8df (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>

namespace DB
{

struct TemporaryFileStreamLegacy;

class TemporaryFileLazySource : public ISource
{
public:
    TemporaryFileLazySource(const std::string & path_, const Block & header_);
    ~TemporaryFileLazySource() override;
    String getName() const override { return "TemporaryFileLazySource"; }

protected:
    Chunk generate() override;

private:
    const std::string path;
    Block header;
    bool done;

    std::unique_ptr<TemporaryFileStreamLegacy> stream;
};

}