From e9de8c88756aac38fadc51e5db3a3a7832309a10 Mon Sep 17 00:00:00 2001 From: Nikolai Kochetov Date: Wed, 16 Sep 2020 15:21:26 +0300 Subject: [PATCH] Fix build. --- src/Functions/array/arrayPop.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Functions/array/arrayPop.h b/src/Functions/array/arrayPop.h index 45cbd091ddf..7c32acb78b4 100644 --- a/src/Functions/array/arrayPop.h +++ b/src/Functions/array/arrayPop.h @@ -48,8 +48,6 @@ public: return; } - auto result_column = return_type->createColumn(); - const auto & array_column = block.getByPosition(arguments[0]).column; std::unique_ptr source; @@ -61,14 +59,14 @@ public: else throw Exception{"First arguments for function " + getName() + " must be array.", ErrorCodes::LOGICAL_ERROR}; - auto sink = GatherUtils::createArraySink(typeid_cast(*result_column), size); + ColumnArray::MutablePtr sink; if (pop_front) - GatherUtils::sliceFromLeftConstantOffsetUnbounded(*source, *sink, 1); + sink = GatherUtils::sliceFromLeftConstantOffsetUnbounded(*source, 1); else - GatherUtils::sliceFromLeftConstantOffsetBounded(*source, *sink, 0, -1); + sink = GatherUtils::sliceFromLeftConstantOffsetBounded(*source, 0, -1); - block.getByPosition(result).column = std::move(result_column); + block.getByPosition(result).column = std::move(sink); } bool useDefaultImplementationForConstants() const override { return true; }