From eed2ea3b364e7baf70de4165dfc125fa4ad47788 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Wed, 15 Apr 2020 06:02:51 +0300 Subject: [PATCH 1/2] Remove strange code --- src/Functions/array/arrayIndex.h | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/Functions/array/arrayIndex.h b/src/Functions/array/arrayIndex.h index 1b1ac172f24..96a7ba3c143 100644 --- a/src/Functions/array/arrayIndex.h +++ b/src/Functions/array/arrayIndex.h @@ -225,21 +225,6 @@ public: } }; -/// Specialization that catches internal errors. -template -struct ArrayIndexNumImpl -{ - template - static void vector( - const PaddedPODArray &, const ColumnArray::Offsets &, - const ScalarOrVector &, - PaddedPODArray &, - const PaddedPODArray *, - const PaddedPODArray *) - { - throw Exception{"Logical error in implementation of a function that returns array index", ErrorCodes::LOGICAL_ERROR}; - } -}; /// Implementation for arrays of numbers when the 2nd function argument /// is a NULL value. @@ -623,8 +608,7 @@ private: || executeNumberNumber(block, arguments, result) || executeNumberNumber(block, arguments, result) || executeNumberNumber(block, arguments, result) - || executeNumberNumber(block, arguments, result) - || executeNumberNumber(block, arguments, result); + || executeNumberNumber(block, arguments, result); } template From 19c4968ca6c0c9887d7ef2855cc690328852ad21 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Wed, 15 Apr 2020 07:02:41 +0300 Subject: [PATCH 2/2] Update arrayIndex.h --- src/Functions/array/arrayIndex.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Functions/array/arrayIndex.h b/src/Functions/array/arrayIndex.h index 96a7ba3c143..fab1332cbda 100644 --- a/src/Functions/array/arrayIndex.h +++ b/src/Functions/array/arrayIndex.h @@ -19,7 +19,6 @@ namespace DB namespace ErrorCodes { - extern const int LOGICAL_ERROR; extern const int ILLEGAL_COLUMN; extern const int ILLEGAL_TYPE_OF_ARGUMENT; }