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

Function test_write_datum_int_and_string

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

Source from the content-addressed store, hash-verified

1382
1383 #[test]
1384 fn test_write_datum_int_and_string() {
1385 let mut builder = BinaryRowBuilder::new(2);
1386 builder.write_datum(
1387 0,
1388 &Datum::Int(42),
1389 &DataType::Int(crate::spec::IntType::new()),
1390 );
1391 builder.write_datum(
1392 1,
1393 &Datum::String("hello".to_string()),
1394 &DataType::VarChar(crate::spec::VarCharType::string_type()),
1395 );
1396 let row = builder.build();
1397 assert_eq!(row.get_int(0).unwrap(), 42);
1398 assert_eq!(row.get_string(1).unwrap(), "hello");
1399 }
1400
1401 #[test]
1402 fn test_write_datum_long_string() {

Callers

nothing calls this directly

Calls 2

write_datumMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected