[fix](function) bad performance caused by creating Status::RuntimeError (#28362)
This commit is contained in:
@ -961,8 +961,7 @@ public:
|
||||
}
|
||||
|
||||
bool check_overflow_for_decimal = context->check_overflow_for_decimal();
|
||||
auto status = Status::RuntimeError("{}'s arguments do not match the expected data types",
|
||||
get_name());
|
||||
Status status;
|
||||
bool valid = cast_both_types(
|
||||
left_generic, right_generic, result_generic,
|
||||
[&](const auto& left, const auto& right, const auto& res) {
|
||||
@ -1016,6 +1015,10 @@ public:
|
||||
return false;
|
||||
});
|
||||
if (!valid) {
|
||||
if (status.ok()) {
|
||||
return Status::RuntimeError("{}'s arguments do not match the expected data types",
|
||||
get_name());
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user