mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
Fix error
This commit is contained in:
parent
cb611e698a
commit
7fc3cd7fb0
@ -898,6 +898,10 @@ class FunctionBinaryArithmetic : public IFunction
|
||||
if (isDateOrDate32(arguments[1].type) || isDateTime(arguments[1].type) || isDateTime64(arguments[1].type))
|
||||
std::swap(new_arguments[0], new_arguments[1]);
|
||||
|
||||
/// Change interval argument type to its representation
|
||||
if (WhichDataType(new_arguments[1].type).isInterval())
|
||||
new_arguments[1].type = std::make_shared<DataTypeNumber<DataTypeInterval::FieldType>>();
|
||||
|
||||
auto function = function_builder->build(new_arguments);
|
||||
return function->execute(new_arguments, result_type, input_rows_count);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user