diff --git a/src/Functions/array/FunctionArrayMapped.h b/src/Functions/array/FunctionArrayMapped.h index 28540354b94..e32b4c8e1f3 100644 --- a/src/Functions/array/FunctionArrayMapped.h +++ b/src/Functions/array/FunctionArrayMapped.h @@ -142,7 +142,7 @@ public: + toString(arguments.size()) + ".", ErrorCodes::NUMBER_OF_ARGUMENTS_DOESNT_MATCH); - if (arguments.size() == 1) + if ((arguments.size() == 1) && std::is_same_v) { const auto * array_type = checkAndGetDataType(arguments[0].type.get()); diff --git a/src/Functions/mapFilter.cpp b/src/Functions/mapFilter.cpp index 78a7934b2ba..f38f8f8b4d1 100644 --- a/src/Functions/mapFilter.cpp +++ b/src/Functions/mapFilter.cpp @@ -34,7 +34,7 @@ struct MapFilterImpl static bool needBoolean() { return true; } static bool needExpression() { return true; } - static bool needOneArray() { return false; } + static bool needOneArray() { return true; } static DataTypePtr getReturnType(const DataTypePtr & /*expression_return*/, const DataTypes & elems) { @@ -101,7 +101,7 @@ struct MapApplyImpl /// true if the expression (for an overload of f(expression, maps)) or a map (for f(map)) should be boolean. static bool needBoolean() { return false; } static bool needExpression() { return true; } - static bool needOneArray() { return false; } + static bool needOneArray() { return true; } static DataTypePtr getReturnType(const DataTypePtr & expression_return, const DataTypes & /*elems*/) {