| 1 | #pragma once | 
|---|---|
| 2 | |
| 3 | #include "ArraySinkVisitor.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 IArraySink | 
| 18 | { | 
| 19 | virtual ~IArraySink() = default; | 
| 20 | |
| 21 | virtual void accept(ArraySinkVisitor &) | 
| 22 | { | 
| 23 | throw Exception( "Accept not implemented for "+ demangle(typeid(*this).name()), ErrorCodes::NOT_IMPLEMENTED); | 
| 24 | } | 
| 25 | }; | 
| 26 | |
| 27 | template <typename Derived> | 
| 28 | class ArraySinkImpl : public Visitable<Derived, IArraySink, ArraySinkVisitor> {}; | 
| 29 | |
| 30 | } | 
| 31 | |
| 32 | } | 
| 33 | 
