aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/clickhouse/src/Processors/Formats/Impl/JSONColumnsWithMetadataBlockInputFormat.h
blob: 9a6ed79c5224bb315eec2a8be528eb2a48d47f06 (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
#pragma once

#include <Processors/Formats/Impl/JSONColumnsBlockInputFormat.h>
#include <Processors/Formats/ISchemaReader.h>

namespace DB
{

class JSONColumnsWithMetadataReader : public JSONColumnsReader
{
public:
    JSONColumnsWithMetadataReader(ReadBuffer & in_, const Block & header_, const FormatSettings & settings);

    void readChunkStart() override;
    bool checkChunkEnd() override;

private:
    const Block & header;
    const bool validate_types_from_metadata;
};

class JSONColumnsWithMetadataSchemaReader : public ISchemaReader
{
public:
    JSONColumnsWithMetadataSchemaReader(ReadBuffer & in_);

    NamesAndTypesList readSchema() override;
};


}