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

Function test_zstd_compression

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

Source from the content-addressed store, hash-verified

296
297#[tokio::test]
298async fn test_zstd_compression() {
299 let buf = VecFileWrite::new();
300 let mut writer = BTreeIndexWriter::new(Box::new(buf.clone()), 64, BlockCompressionType::Zstd);
301
302 for i in 0..100 {
303 writer.write(Some(&int_key(i)), i as i64).await.unwrap();
304 }
305
306 let result = writer.finish().await.unwrap();
307 let reader = write_and_open(&buf, &result, int_cmp).await;
308
309 let all = reader.all_non_null_rows().await.unwrap();
310 assert_eq!(all.len(), 100);
311
312 let bm = reader.query_equal(&int_key(50)).await.unwrap();
313 assert_eq!(bm.len(), 1);
314 assert!(bm.contains(50));
315}
316
317#[tokio::test]
318async fn test_single_entry() {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected