2015-11-21 03:19:43 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <DB/Columns/IColumn.h>
|
|
|
|
|
|
|
|
|
2017-03-09 00:56:38 +00:00
|
|
|
/// Common helper methods for implementation of different columns.
|
2015-11-21 03:19:43 +00:00
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2017-03-09 00:56:38 +00:00
|
|
|
/// Counts how many bytes of `filt` are greater than zero.
|
2015-11-21 03:19:43 +00:00
|
|
|
size_t countBytesInFilter(const IColumn::Filter & filt);
|
|
|
|
|
|
|
|
|
2017-03-09 00:56:38 +00:00
|
|
|
/// The general implementation of `filter` function for ColumnArray and ColumnString.
|
2015-11-21 03:19:43 +00:00
|
|
|
template <typename T>
|
|
|
|
void filterArraysImpl(
|
2016-04-15 00:33:21 +00:00
|
|
|
const PaddedPODArray<T> & src_elems, const IColumn::Offsets_t & src_offsets,
|
|
|
|
PaddedPODArray<T> & res_elems, IColumn::Offsets_t & res_offsets,
|
2015-12-05 07:01:18 +00:00
|
|
|
const IColumn::Filter & filt, ssize_t result_size_hint);
|
2015-11-21 03:19:43 +00:00
|
|
|
|
|
|
|
}
|