diff --git a/src/core_functions/scalar/string/printf.cpp b/src/core_functions/scalar/string/printf.cpp index 1c8dcdc46700..7bb3e1a83015 100644 --- a/src/core_functions/scalar/string/printf.cpp +++ b/src/core_functions/scalar/string/printf.cpp @@ -27,14 +27,19 @@ unique_ptr BindPrintfFunction(ClientContext &context, ScalarFuncti for (idx_t i = 1; i < arguments.size(); i++) { switch (arguments[i]->return_type.id()) { case LogicalTypeId::BOOLEAN: + case LogicalTypeId::UTINYINT: + case LogicalTypeId::USMALLINT: + case LogicalTypeId::UINTEGER: + case LogicalTypeId::UBIGINT: + case LogicalTypeId::UHUGEINT: case LogicalTypeId::TINYINT: case LogicalTypeId::SMALLINT: case LogicalTypeId::INTEGER: case LogicalTypeId::BIGINT: + case LogicalTypeId::HUGEINT: case LogicalTypeId::FLOAT: case LogicalTypeId::DOUBLE: case LogicalTypeId::VARCHAR: - case LogicalTypeId::HUGEINT: // these types are natively supported bound_function.arguments.push_back(arguments[i]->return_type); break; @@ -106,6 +111,31 @@ static void PrintfFunction(DataChunk &args, ExpressionState &state, Vector &resu format_args.emplace_back(duckdb_fmt::internal::make_arg(arg_data[arg_idx])); break; } + case LogicalTypeId::UTINYINT: { + auto arg_data = FlatVector::GetData(col); + format_args.emplace_back(duckdb_fmt::internal::make_arg(arg_data[arg_idx])); + break; + } + case LogicalTypeId::USMALLINT: { + auto arg_data = FlatVector::GetData(col); + format_args.emplace_back(duckdb_fmt::internal::make_arg(arg_data[arg_idx])); + break; + } + case LogicalTypeId::UINTEGER: { + auto arg_data = FlatVector::GetData(col); + format_args.emplace_back(duckdb_fmt::internal::make_arg(arg_data[arg_idx])); + break; + } + case LogicalTypeId::UBIGINT: { + auto arg_data = FlatVector::GetData(col); + format_args.emplace_back(duckdb_fmt::internal::make_arg(arg_data[arg_idx])); + break; + } + case LogicalTypeId::UHUGEINT: { + auto arg_data = FlatVector::GetData(col); + format_args.emplace_back(duckdb_fmt::internal::make_arg(arg_data[arg_idx])); + break; + } case LogicalTypeId::TINYINT: { auto arg_data = FlatVector::GetData(col); format_args.emplace_back(duckdb_fmt::internal::make_arg(arg_data[arg_idx]));