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

Function test_single_entry

crates/paimon/src/btree/tests.rs:318–332  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

316
317#[tokio::test]
318async fn test_single_entry() {
319 let buf = VecFileWrite::new();
320 let mut writer = BTreeIndexWriter::new(Box::new(buf.clone()), 256, BlockCompressionType::None);
321 writer.write(Some(&int_key(42)), 99).await.unwrap();
322
323 let result = writer.finish().await.unwrap();
324 let reader = write_and_open(&buf, &result, int_cmp).await;
325
326 let bm = reader.query_equal(&int_key(42)).await.unwrap();
327 assert_eq!(bm.len(), 1);
328 assert!(bm.contains(99));
329
330 let all = reader.all_non_null_rows().await.unwrap();
331 assert_eq!(all.len(), 1);
332}
333
334#[tokio::test]
335async fn test_boundary_queries() {

Callers

nothing calls this directly

Calls 6

int_keyFunction · 0.85
write_and_openFunction · 0.85
query_equalMethod · 0.80
all_non_null_rowsMethod · 0.80
writeMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected