ClickHouse/dbms/src/Processors/Formats/Impl/ParquetBlockInputFormat.h

42 lines
817 B
C++
Raw Normal View History

#pragma once
2019-08-02 16:00:24 +00:00
#include "config_formats.h"
#if USE_PARQUET
2019-08-02 16:00:24 +00:00
#include <Processors/Formats/IInputFormat.h>
namespace parquet { namespace arrow { class FileReader; } }
namespace arrow { class Buffer; }
namespace DB
{
class Context;
class ParquetBlockInputFormat: public IInputFormat
{
public:
2019-08-03 11:02:40 +00:00
ParquetBlockInputFormat(ReadBuffer & in_, Block header_, const Context & context_);
String getName() const override { return "ParquetBlockInputFormat"; }
protected:
Chunk generate() override;
private:
// TODO: check that this class implements every part of its parent
const Context & context;
std::unique_ptr<parquet::arrow::FileReader> file_reader;
std::string file_data;
std::unique_ptr<arrow::Buffer> buffer;
int row_group_total = 0;
int row_group_current = 0;
};
}
#endif