blob: ccd0bd7c3401a1eb8254eccb6cf502f72c4bd24b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#pragma once
#include "clickhouse_config.h"
#if USE_HIVE
#include <IO/PeekableReadBuffer.h>
#include <Processors/Formats/Impl/CSVRowInputFormat.h>
namespace DB
{
/// A stream for input data in Hive Text format.
class HiveTextRowInputFormat final : public CSVRowInputFormat
{
public:
HiveTextRowInputFormat(const Block & header_, ReadBuffer & in_, const Params & params_, const FormatSettings & format_settings_);
String getName() const override { return "HiveTextRowInputFormat"; }
private:
HiveTextRowInputFormat(
const Block & header_, std::shared_ptr<PeekableReadBuffer> buf_, const Params & params_, const FormatSettings & format_settings_);
};
class HiveTextFormatReader final : public CSVFormatReader
{
public:
HiveTextFormatReader(PeekableReadBuffer & buf_, const FormatSettings & format_settings_);
std::vector<String> readNames() override;
std::vector<String> readTypes() override;
private:
std::vector<String> input_field_names;
};
}
#endif
|