mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
47 lines
679 B
C++
47 lines
679 B
C++
#pragma once
|
|
|
|
#include <Columns/IColumn.h>
|
|
|
|
namespace DB::GatherUtils
|
|
{
|
|
|
|
template <typename T>
|
|
struct NumericArraySlice
|
|
{
|
|
const T * data;
|
|
size_t size;
|
|
};
|
|
|
|
struct GenericArraySlice
|
|
{
|
|
const IColumn * elements;
|
|
size_t begin;
|
|
size_t size;
|
|
};
|
|
|
|
template <typename Slice>
|
|
struct NullableSlice : public Slice
|
|
{
|
|
const UInt8 * null_map = nullptr;
|
|
|
|
NullableSlice() = default;
|
|
NullableSlice(const Slice & base) : Slice(base) {}
|
|
};
|
|
|
|
template <typename T>
|
|
struct NumericValueSlice
|
|
{
|
|
T value;
|
|
static constexpr size_t size = 1;
|
|
};
|
|
|
|
struct GenericValueSlice
|
|
{
|
|
const IColumn * elements;
|
|
size_t position;
|
|
static constexpr size_t size = 1;
|
|
};
|
|
|
|
}
|
|
|