229335 {
229336 ScalarFunctionSet modulo("%");
229338 if (type.id() == LogicalTypeId::FLOAT || type.id() == LogicalTypeId::DOUBLE) {
229339 modulo.AddFunction(ScalarFunction({type, type}, type, nullptr, BindBinaryFloatingPoint<ModuloOperator>));
229340 } else if (type.id() == LogicalTypeId::DECIMAL) {
229341 modulo.AddFunction(ScalarFunction({type, type}, type, nullptr, BindDecimalModulo<ModuloOperator>));
229342 } else {
229343 modulo.AddFunction(
229344 ScalarFunction({type, type}, type, GetBinaryFunctionIgnoreZero<ModuloOperator>(type.InternalType())));
229345 }
229346 }
229347 for (auto &func : modulo.functions) {
229348 func.SetFallible();
229349 }
229350
229351 return modulo;
229352}
static DUCKDB_API const vector< LogicalType > Numeric()
A list of all NUMERIC types (integral and floating point types).
Definition duckdb.cpp:139263