diff --git a/dbms/src/Functions/FunctionBinaryArithmetic.h b/dbms/src/Functions/FunctionBinaryArithmetic.h index b3db857dc0f..66eb7be01cb 100644 --- a/dbms/src/Functions/FunctionBinaryArithmetic.h +++ b/dbms/src/Functions/FunctionBinaryArithmetic.h @@ -584,7 +584,7 @@ class FunctionBinaryArithmetic : public IFunction std::string function_name; if (interval_data_type) { - function_name = (function_is_plus ? "add" : "subtract") + interval_data_type->getKind().toString() + 's'; + function_name = String(function_is_plus ? "add" : "subtract") + interval_data_type->getKind().toString() + 's'; } else { @@ -594,7 +594,7 @@ class FunctionBinaryArithmetic : public IFunction function_name = function_is_plus ? "addSeconds" : "subtractSeconds"; } - return FunctionFactory::instance().get(function_name.str(), context); + return FunctionFactory::instance().get(function_name, context); } bool isAggregateMultiply(const DataTypePtr & type0, const DataTypePtr & type1) const