should be it
This commit is contained in:
17
external/duckdb/test/sql/cast/float_decimal_cast.test
vendored
Normal file
17
external/duckdb/test/sql/cast/float_decimal_cast.test
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
# name: test/sql/cast/float_decimal_cast.test
|
||||
# description: Rounding half up in float => decimal casts
|
||||
# group: [cast]
|
||||
|
||||
statement ok
|
||||
PRAGMA enable_verification
|
||||
|
||||
# PG does NOT use statistical ("Banker's") rounding for floating point => decimal
|
||||
|
||||
foreach src FLOAT DOUBLE
|
||||
|
||||
query II
|
||||
select 1.35::${src}::decimal(3, 1), 1.45::${src}::decimal(3, 1)
|
||||
----
|
||||
1.4 1.5
|
||||
|
||||
endloop
|
||||
Reference in New Issue
Block a user