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

Function test_write_empty_batch

crates/paimon/src/table/table_write.rs:1037–1048  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1035
1036 #[tokio::test]
1037 async fn test_write_empty_batch() {
1038 let file_io = test_file_io();
1039 let table_path = "memory:/test_table_write_empty";
1040 let table = test_table(&file_io, table_path);
1041 let mut table_write = TableWrite::new(&table, "test-user".to_string()).unwrap();
1042
1043 let batch = make_batch(vec![], vec![]);
1044 table_write.write_arrow_batch(&batch).await.unwrap();
1045
1046 let messages = table_write.prepare_commit().await.unwrap();
1047 assert!(messages.is_empty());
1048 }
1049
1050 #[tokio::test]
1051 async fn test_prepare_commit_reusable() {

Callers

nothing calls this directly

Calls 5

write_arrow_batchMethod · 0.80
test_file_ioFunction · 0.70
test_tableFunction · 0.70
make_batchFunction · 0.70
prepare_commitMethod · 0.45

Tested by

no test coverage detected