MCPcopy Create free account
hub / github.com/apache/paimon-rust / test_get_float_double

Function test_get_float_double

crates/paimon/src/spec/binary_row.rs:1224–1232  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1222
1223 #[test]
1224 fn test_get_float_double() {
1225 let mut builder = BinaryRowBuilder::new(2);
1226 builder.write_float(0, 1.5_f32);
1227 builder.write_double(1, std::f64::consts::PI);
1228 let row = builder.build();
1229
1230 assert!((row.get_float(0).unwrap() - 1.5_f32).abs() < f32::EPSILON);
1231 assert!((row.get_double(1).unwrap() - std::f64::consts::PI).abs() < f64::EPSILON);
1232 }
1233
1234 #[test]
1235 fn test_null_handling() {

Callers

nothing calls this directly

Calls 3

write_floatMethod · 0.80
write_doubleMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected