aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Processors/Formats/Impl/OneFormat.h
blob: f73b2dab66ac90facb416d910a5c127e08722aef (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
29
30
31
32
#pragma once
#include <Processors/Formats/IInputFormat.h>
#include <Processors/Formats/ISchemaReader.h>
#include <DataTypes/DataTypesNumber.h>

namespace DB
{

class OneInputFormat final : public IInputFormat
{
public:
    OneInputFormat(const Block & header, ReadBuffer & in_);

    String getName() const override { return "One"; }

protected:
    Chunk generate() override;

private:
    bool done = false;
};

class OneSchemaReader: public IExternalSchemaReader
{
public:
    NamesAndTypesList readSchema() override
    {
        return {{"dummy", std::make_shared<DataTypeUInt8>()}};
    }
};

}