blob: 7eb02055e3aba11a727f1f4692cab0c137f84115 (
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
41
42
43
44
45
46
47
48
49
50
51
52
53
|
#pragma once
#include <Core/Block.h>
#include "IDictionarySource.h"
namespace DB
{
namespace ErrorCodes
{
extern const int NOT_IMPLEMENTED;
}
/// Allows creating empty dictionary
class NullDictionarySource final : public IDictionarySource
{
public:
NullDictionarySource(Block & sample_block_);
NullDictionarySource(const NullDictionarySource & other);
QueryPipeline loadAll() override;
QueryPipeline loadUpdatedAll() override
{
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method loadUpdatedAll is unsupported for NullDictionarySource");
}
QueryPipeline loadIds(const std::vector<UInt64> & /*ids*/) override
{
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method loadIds is unsupported for NullDictionarySource");
}
QueryPipeline loadKeys(const Columns & /*key_columns*/, const std::vector<size_t> & /*requested_rows*/) override
{
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method loadKeys is unsupported for NullDictionarySource");
}
bool isModified() const override { return false; }
bool supportsSelectiveLoad() const override { return false; }
///Not supported for NullDictionarySource
bool hasUpdateField() const override { return false; }
DictionarySourcePtr clone() const override { return std::make_shared<NullDictionarySource>(*this); }
std::string toString() const override;
private:
Block sample_block;
};
}
|