213381 {
213382 auto data = (DecimalScaleInput<INPUT_TYPE, RESULT_TYPE> *)dataptr;
213383 if (input >= data->limit || input <= -data->limit) {
213384 auto error =
StringUtil::Format(
"Casting value \"%s\" to type %s failed: value is out of range!",
213385 Decimal::ToString(input, data->source_width, data->source_scale),
213386 data->result.GetType().ToString());
213387 return HandleVectorCastError::Operation<RESULT_TYPE>(std::move(error), mask, idx, data->vector_cast_data);
213388 }
213389 return Cast::Operation<INPUT_TYPE, RESULT_TYPE>(input) * data->factor;
213390 }
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002