1#pragma once
2
3#include "config_formats.h"
4#if USE_PARQUET
5
6#include <Processors/Formats/IInputFormat.h>
7
8
9namespace parquet { namespace arrow { class FileReader; } }
10namespace arrow { class Buffer; }
11
12namespace DB
13{
14class Context;
15
16class ParquetBlockInputFormat: public IInputFormat
17{
18public:
19 ParquetBlockInputFormat(ReadBuffer & in_, Block header_);
20
21 void resetParser() override;
22
23
24 String getName() const override { return "ParquetBlockInputFormat"; }
25
26protected:
27 Chunk generate() override;
28
29private:
30
31 // TODO: check that this class implements every part of its parent
32
33 std::unique_ptr<parquet::arrow::FileReader> file_reader;
34 std::string file_data;
35 std::unique_ptr<arrow::Buffer> buffer;
36 int row_group_total = 0;
37 int row_group_current = 0;
38};
39
40}
41
42#endif
43