mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 21:51:57 +00:00
added IColumn::select
This commit is contained in:
parent
4369613435
commit
44807df50f
@ -313,7 +313,7 @@ INSTANTIATE(Float64)
|
||||
namespace detail
|
||||
{
|
||||
template <typename T>
|
||||
PaddedPODArray<T> * const getIndexesData(const ColumnPtr & indexes)
|
||||
const PaddedPODArray<T> * getIndexesData(const ColumnPtr & indexes)
|
||||
{
|
||||
auto * column = typeid_cast<const ColumnVector<T> *>(indexes.get());
|
||||
if (column)
|
||||
@ -323,9 +323,9 @@ namespace detail
|
||||
}
|
||||
}
|
||||
|
||||
PaddedPODArray<UInt8> * const detail::getIndexesData<UInt8>(const DB::ColumnPtr & indexes);
|
||||
PaddedPODArray<UInt16> * const detail::getIndexesData<UInt16>(const DB::ColumnPtr & indexes);
|
||||
PaddedPODArray<UInt32> * const detail::getIndexesData<UInt32>(const DB::ColumnPtr & indexes);
|
||||
PaddedPODArray<UInt64> * const detail::getIndexesData<UInt64>(const DB::ColumnPtr & indexes);
|
||||
const PaddedPODArray<UInt8> * detail::getIndexesData<UInt8>(const DB::ColumnPtr & indexes);
|
||||
const PaddedPODArray<UInt16> * detail::getIndexesData<UInt16>(const DB::ColumnPtr & indexes);
|
||||
const PaddedPODArray<UInt32> * detail::getIndexesData<UInt32>(const DB::ColumnPtr & indexes);
|
||||
const PaddedPODArray<UInt64> * detail::getIndexesData<UInt64>(const DB::ColumnPtr & indexes);
|
||||
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ void filterArraysImplOnlyData(
|
||||
namespace detail
|
||||
{
|
||||
template <typename T>
|
||||
PaddedPODArray<T> * const getIndexesData(const ColumnPtr & indexes);
|
||||
const PaddedPODArray<T> * getIndexesData(const ColumnPtr & indexes);
|
||||
}
|
||||
|
||||
/// Check limit <= indexes->size() and call column.indexImpl(const PaddedPodArray<Type> & indexes, size_t limit).
|
||||
@ -55,13 +55,13 @@ ColumnPtr selectIndexImpl(const Column & column, const ColumnPtr & indexes, size
|
||||
throw Exception("Size of indexes is less than required.", ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH);
|
||||
|
||||
if (auto * data_uint8 = detail::getIndexesData<UInt8>(indexes))
|
||||
return column.selectImpl<UInt8>(*data_uint8, limit);
|
||||
return column.template selectImpl<UInt8>(*data_uint8, limit);
|
||||
else if (auto * data_uint16 = detail::getIndexesData<UInt16>(indexes))
|
||||
return column.selectImpl<UInt16>(*data_uint16, limit);
|
||||
return column.template selectImpl<UInt16>(*data_uint16, limit);
|
||||
else if (auto * data_uint32 = detail::getIndexesData<UInt32>(indexes))
|
||||
return column.selectImpl<UInt32>(*data_uint32, limit);
|
||||
return column.template selectImpl<UInt32>(*data_uint32, limit);
|
||||
else if (auto * data_uint64 = detail::getIndexesData<UInt64>(indexes))
|
||||
return column.selectImpl<UInt64>(*data_uint64, limit);
|
||||
return column.template selectImpl<UInt64>(*data_uint64, limit);
|
||||
else
|
||||
throw Exception("Indexes column for IColumn::select must be ColumnUInt, got" + indexes->getName(),
|
||||
ErrorCodes::LOGICAL_ERROR);
|
||||
|
Loading…
Reference in New Issue
Block a user