Update FunctionsArray.h

This commit is contained in:
alexey-milovidov 2018-07-23 19:25:43 +03:00
parent 1a57a05342
commit ff2fdac25c

View File

@ -1011,7 +1011,8 @@ public:
DataTypePtr observed_type0 = removeNullable(array_type->getNestedType());
DataTypePtr observed_type1 = removeNullable(arguments[1]);
if (!((observed_type0->isNumber() || observed_type0->isValueRepresentedByNumber()) && observed_type1->isNumber())
/// We also support arrays of Enum type (that are represented by number) to search numeric values.
if (!(observed_type0->isValueRepresentedByNumber() && observed_type1->isNumber())
&& !observed_type0->equals(*observed_type1))
throw Exception("Types of array and 2nd argument of function "
+ getName() + " must be identical up to nullability. Passed: "