Upd FunctionArrayMapped

This commit is contained in:
vdimir 2022-02-23 09:22:40 +00:00
parent 939a15d29a
commit f7f002139a
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
2 changed files with 3 additions and 3 deletions

View File

@ -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<typename Impl::data_type, DataTypeArray>)
{
const auto * array_type = checkAndGetDataType<typename Impl::data_type>(arguments[0].type.get());

View File

@ -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*/)
{