1#pragma once
2
3#include "config_formats.h"
4#if USE_PARQUET
5# include <Processors/Formats/IOutputFormat.h>
6# include <Formats/FormatSettings.h>
7
8namespace arrow
9{
10class Array;
11class DataType;
12}
13
14namespace parquet
15{
16namespace arrow
17{
18 class FileWriter;
19}
20}
21
22namespace DB
23{
24class ParquetBlockOutputFormat : public IOutputFormat
25{
26public:
27 ParquetBlockOutputFormat(WriteBuffer & out_, const Block & header_, const FormatSettings & format_settings_);
28
29 String getName() const override { return "ParquetBlockOutputFormat"; }
30 void consume(Chunk) override;
31 void finalize() override;
32
33 String getContentType() const override { return "application/octet-stream"; }
34
35private:
36 const FormatSettings format_settings;
37
38 std::unique_ptr<parquet::arrow::FileWriter> file_writer;
39};
40
41}
42
43#endif
44