1 | #pragma once |
2 | |
3 | #include <Columns/IColumn.h> |
4 | |
5 | namespace DB::GatherUtils |
6 | { |
7 | |
8 | template <typename T> |
9 | struct NumericArraySlice |
10 | { |
11 | const T * data; |
12 | size_t size; |
13 | }; |
14 | |
15 | struct GenericArraySlice |
16 | { |
17 | const IColumn * elements; |
18 | size_t begin; |
19 | size_t size; |
20 | }; |
21 | |
22 | template <typename Slice> |
23 | struct NullableSlice : public Slice |
24 | { |
25 | const UInt8 * null_map = nullptr; |
26 | |
27 | NullableSlice() = default; |
28 | NullableSlice(const Slice & base) : Slice(base) {} |
29 | }; |
30 | |
31 | template <typename T> |
32 | struct NumericValueSlice |
33 | { |
34 | T value; |
35 | static constexpr size_t size = 1; |
36 | }; |
37 | |
38 | struct GenericValueSlice |
39 | { |
40 | const IColumn * elements; |
41 | size_t position; |
42 | static constexpr size_t size = 1; |
43 | }; |
44 | |
45 | } |
46 | |
47 | |