213468 {
213469 auto data = static_cast<DecimalScaleInput<INPUT_TYPE> *>(dataptr);
213470 if (!CanScaleDownDecimal(input, *data)) {
213471 auto error =
StringUtil::Format(
"Casting value \"%s\" to type %s failed: value is out of range!",
213472 Decimal::ToString(input, data->source_width, data->source_scale),
213473 data->result.GetType().ToString());
213474 return HandleVectorCastError::Operation<RESULT_TYPE>(std::move(error), mask, idx, data->vector_cast_data);
213475 }
213476 return DecimalScaleDownOperator::Operation<INPUT_TYPE, RESULT_TYPE>(input, mask, idx, dataptr);
213477 }
static string Format(const string fmt_str, ARGS... params)
Format a string using printf semantics.
Definition duckdb.hpp:4002