Merge pull request #10271 from ClickHouse/remove-strange-code

Remove strange code in arrayIndex function
This commit is contained in:
alexey-milovidov 2020-04-15 16:41:18 +03:00 committed by GitHub
commit 8c8a315bd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
@ -225,21 +224,6 @@ public:
}
};
/// Specialization that catches internal errors.
template <typename T, typename IndexConv>
struct ArrayIndexNumImpl<T, Null, IndexConv>
{
template <typename ScalarOrVector>
static void vector(
const PaddedPODArray<T> &, const ColumnArray::Offsets &,
const ScalarOrVector &,
PaddedPODArray<typename IndexConv::ResultType> &,
const PaddedPODArray<UInt8> *,
const PaddedPODArray<UInt8> *)
{
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 +607,7 @@ private:
|| executeNumberNumber<T, Int32>(block, arguments, result)
|| executeNumberNumber<T, Int64>(block, arguments, result)
|| executeNumberNumber<T, Float32>(block, arguments, result)
|| executeNumberNumber<T, Float64>(block, arguments, result)
|| executeNumberNumber<T, Null>(block, arguments, result);
|| executeNumberNumber<T, Float64>(block, arguments, result);
}
template <typename T, typename U>