blob: 8278b7ea19ba50fd0a7f97ff376f83244c6c5a8d (
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
|
#pragma once
#include "ValueSourceVisitor.h"
#include <Common/Exception.h>
namespace DB
{
namespace ErrorCodes
{
extern const int NOT_IMPLEMENTED;
}
namespace GatherUtils
{
struct IValueSource
{
virtual ~IValueSource() = default;
virtual void accept(ValueSourceVisitor &)
{
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Accept not implemented for {}", demangle(typeid(*this).name()));
}
virtual bool isConst() const { return false; }
};
template <typename Derived>
class ValueSourceImpl : public Visitable<Derived, IValueSource, ValueSourceVisitor> {};
}
}
|