ClickHouse/src/Processors/Formats/Impl/ParquetBlockOutputFormat.h

44 lines
808 B
C++
Raw Normal View History

#pragma once
2019-08-02 16:09:52 +00:00
#include "config_formats.h"
#if USE_PARQUET
# include <Processors/Formats/IOutputFormat.h>
# include <Formats/FormatSettings.h>
namespace arrow
{
class Array;
class DataType;
}
namespace parquet
{
namespace arrow
{
class FileWriter;
}
}
namespace DB
{
class ParquetBlockOutputFormat : public IOutputFormat
{
public:
2019-08-03 11:02:40 +00:00
ParquetBlockOutputFormat(WriteBuffer & out_, const Block & header_, const FormatSettings & format_settings_);
String getName() const override { return "ParquetBlockOutputFormat"; }
void consume(Chunk) override;
void finalize() override;
String getContentType() const override { return "application/octet-stream"; }
private:
const FormatSettings format_settings;
std::unique_ptr<parquet::arrow::FileWriter> file_writer;
};
}
#endif