mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-25 03:00:49 +00:00
41 lines
817 B
C++
41 lines
817 B
C++
|
#pragma once
|
||
|
|
||
|
#include "config_formats.h"
|
||
|
#include <DataStreams/IBlockInputStream.h>
|
||
|
#include <Processors/Chunk.h>
|
||
|
#include <Processors/Formats/IInputFormat.h>
|
||
|
|
||
|
#if USE_ORC
|
||
|
|
||
|
#include "arrow/adapters/orc/adapter.h"
|
||
|
#include "arrow/io/interfaces.h"
|
||
|
|
||
|
namespace DB
|
||
|
{
|
||
|
class Context;
|
||
|
|
||
|
class ORCBlockInputFormat: public IInputFormat
|
||
|
{
|
||
|
public:
|
||
|
ORCBlockInputFormat(ReadBuffer & in_, Block header_, const Context & context_);
|
||
|
|
||
|
String getName() const override { return "ORCBlockInputFormat"; }
|
||
|
|
||
|
protected:
|
||
|
Chunk generate() override;
|
||
|
|
||
|
private:
|
||
|
|
||
|
// TODO: check that this class implements every part of its parent
|
||
|
|
||
|
const Context & context;
|
||
|
|
||
|
std::unique_ptr<arrow::adapters::orc::ORCFileReader> file_reader;
|
||
|
std::string file_data;
|
||
|
int row_group_total = 0;
|
||
|
int row_group_current = 0;
|
||
|
};
|
||
|
|
||
|
}
|
||
|
#endif
|