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

#include <Processors/Formats/Impl/JSONColumnsBlockInputFormatBase.h>

namespace DB
{

/* Format JSONColumns reads each block of data in the next format:
 * {
 *     "name1": [value1, value2, value3, ...],
 *     "name2": [value1, value2m value3, ...],
 *     ...
 * }
 */
class JSONColumnsReader : public JSONColumnsReaderBase
{
public:
    JSONColumnsReader(ReadBuffer & in_);

    void readChunkStart() override;
    std::optional<String> readColumnStart() override;
    bool checkChunkEnd() override;
};

}