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

Function create_test_catalog

crates/paimon/src/catalog/filesystem.rs:435–442  ·  view source on GitHub ↗

Returns a temp dir guard (keep alive for test duration) and a catalog using it as warehouse.

()

Source from the content-addressed store, hash-verified

433
434 /// Returns a temp dir guard (keep alive for test duration) and a catalog using it as warehouse.
435 fn create_test_catalog() -> (TempDir, FileSystemCatalog) {
436 let temp_dir = TempDir::new().unwrap();
437 let warehouse = temp_dir.path().to_str().unwrap().to_string();
438 let mut options = Options::new();
439 options.set(CatalogOptions::WAREHOUSE, warehouse);
440 let catalog = FileSystemCatalog::new(options).unwrap();
441 (temp_dir, catalog)
442 }
443
444 fn testing_schema() -> Schema {
445 Schema::builder()

Calls 2

pathMethod · 0.80
setMethod · 0.80