From 44807df50fbba6843312ae5e6b722a6c4fa587f7 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Mon, 23 Apr 2018 19:48:46 +0300 Subject: [PATCH] added IColumn::select --- dbms/src/Columns/ColumnsCommon.cpp | 10 +++++----- dbms/src/Columns/ColumnsCommon.h | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dbms/src/Columns/ColumnsCommon.cpp b/dbms/src/Columns/ColumnsCommon.cpp index b068f18928e..f8a3a3503e2 100644 --- a/dbms/src/Columns/ColumnsCommon.cpp +++ b/dbms/src/Columns/ColumnsCommon.cpp @@ -313,7 +313,7 @@ INSTANTIATE(Float64) namespace detail { template - PaddedPODArray * const getIndexesData(const ColumnPtr & indexes) + const PaddedPODArray * getIndexesData(const ColumnPtr & indexes) { auto * column = typeid_cast *>(indexes.get()); if (column) @@ -323,9 +323,9 @@ namespace detail } } -PaddedPODArray * const detail::getIndexesData(const DB::ColumnPtr & indexes); -PaddedPODArray * const detail::getIndexesData(const DB::ColumnPtr & indexes); -PaddedPODArray * const detail::getIndexesData(const DB::ColumnPtr & indexes); -PaddedPODArray * const detail::getIndexesData(const DB::ColumnPtr & indexes); +const PaddedPODArray * detail::getIndexesData(const DB::ColumnPtr & indexes); +const PaddedPODArray * detail::getIndexesData(const DB::ColumnPtr & indexes); +const PaddedPODArray * detail::getIndexesData(const DB::ColumnPtr & indexes); +const PaddedPODArray * detail::getIndexesData(const DB::ColumnPtr & indexes); } diff --git a/dbms/src/Columns/ColumnsCommon.h b/dbms/src/Columns/ColumnsCommon.h index 2373f00d8cf..4528462afe4 100644 --- a/dbms/src/Columns/ColumnsCommon.h +++ b/dbms/src/Columns/ColumnsCommon.h @@ -41,7 +41,7 @@ void filterArraysImplOnlyData( namespace detail { template - PaddedPODArray * const getIndexesData(const ColumnPtr & indexes); + const PaddedPODArray * getIndexesData(const ColumnPtr & indexes); } /// Check limit <= indexes->size() and call column.indexImpl(const PaddedPodArray & 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(indexes)) - return column.selectImpl(*data_uint8, limit); + return column.template selectImpl(*data_uint8, limit); else if (auto * data_uint16 = detail::getIndexesData(indexes)) - return column.selectImpl(*data_uint16, limit); + return column.template selectImpl(*data_uint16, limit); else if (auto * data_uint32 = detail::getIndexesData(indexes)) - return column.selectImpl(*data_uint32, limit); + return column.template selectImpl(*data_uint32, limit); else if (auto * data_uint64 = detail::getIndexesData(indexes)) - return column.selectImpl(*data_uint64, limit); + return column.template selectImpl(*data_uint64, limit); else throw Exception("Indexes column for IColumn::select must be ColumnUInt, got" + indexes->getName(), ErrorCodes::LOGICAL_ERROR);