We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c076d2 commit b81fbfeCopy full SHA for b81fbfe
1 file changed
datafusion/common/src/scalar/mod.rs
@@ -9680,6 +9680,13 @@ mod tests {
9680
assert_eq!(decimal128.to_string(), "0.1");
9681
assert_eq!(format!("{decimal128:?}"), "Decimal128(0.1,1,1)");
9682
9683
+ let decimal128_trailing_zero = ScalarValue::Decimal128(Some(120), 3, 2);
9684
+ assert_eq!(decimal128_trailing_zero.to_string(), "1.20");
9685
+ assert_eq!(
9686
+ format!("{decimal128_trailing_zero:?}"),
9687
+ "Decimal128(1.20,3,2)"
9688
+ );
9689
+
9690
let decimal256 = ScalarValue::Decimal256(Some(i256::from(100123)), 28, 3);
9691
assert_eq!(decimal256.to_string(), "100.123");
9692
assert_eq!(format!("{decimal256:?}"), "Decimal256(100.123,28,3)");
0 commit comments