mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
35 lines
598 B
C++
35 lines
598 B
C++
#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("Accept not implemented for " + demangle(typeid(*this).name()), ErrorCodes::NOT_IMPLEMENTED);
|
|
}
|
|
|
|
virtual bool isConst() const { return false; }
|
|
};
|
|
|
|
template <typename Derived>
|
|
class ValueSourceImpl : public Visitable<Derived, IValueSource, ValueSourceVisitor> {};
|
|
|
|
}
|
|
|
|
}
|