1 | #pragma once |
---|---|
2 | |
3 | #include "ValueSourceVisitor.h" |
4 | #include <Common/Exception.h> |
5 | |
6 | namespace DB |
7 | { |
8 | |
9 | namespace ErrorCodes |
10 | { |
11 | extern const int NOT_IMPLEMENTED; |
12 | } |
13 | |
14 | namespace GatherUtils |
15 | { |
16 | |
17 | struct IValueSource |
18 | { |
19 | virtual ~IValueSource() = default; |
20 | |
21 | virtual void accept(ValueSourceVisitor &) |
22 | { |
23 | throw Exception("Accept not implemented for "+ demangle(typeid(*this).name()), ErrorCodes::NOT_IMPLEMENTED); |
24 | } |
25 | |
26 | virtual bool isConst() const { return false; } |
27 | }; |
28 | |
29 | template <typename Derived> |
30 | class ValueSourceImpl : public Visitable<Derived, IValueSource, ValueSourceVisitor> {}; |
31 | |
32 | } |
33 | |
34 | } |
35 |