Fix integer overflow in arrayIntersect.

This commit is contained in:
Nikolai Kochetov 2019-11-14 16:37:24 +03:00
parent c633c82928
commit f8d10872c5

View File

@ -310,7 +310,7 @@ FunctionArrayIntersect::UnpackedArrays FunctionArrayIntersect::prepareArrays(
auto & nested_init_type = typeid_cast<const DataTypeArray *>(removeNullable(initial_columns[i].type).get())->getNestedType();
auto & nested_cast_type = typeid_cast<const DataTypeArray *>(removeNullable(columns[i].type).get())->getNestedType();
if (isNativeNumber(nested_init_type) && isDateOrDateTime(nested_init_type))
if (isNativeNumber(nested_init_type) || isDateOrDateTime(nested_init_type))
{
ColumnsWithTypeAndName args = {{arg.nested_column->getPtr(), nested_init_type, ""},
{initial_column->getPtr(), nested_cast_type, ""}};