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

Function create_test_env

crates/integrations/datafusion/tests/common/mod.rs:29–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27use arrow_array::{Array, RecordBatch, UInt64Array};
28
29pub fn create_test_env() -> (TempDir, Arc<FileSystemCatalog>) {
30 let temp_dir = TempDir::new().expect("Failed to create temp dir");
31 let warehouse = format!("file://{}", temp_dir.path().display());
32 let mut options = Options::new();
33 options.set(CatalogOptions::WAREHOUSE, warehouse);
34 let catalog = FileSystemCatalog::new(options).expect("Failed to create catalog");
35 (temp_dir, Arc::new(catalog))
36}
37
38pub async fn create_sql_context(catalog: Arc<FileSystemCatalog>) -> SQLContext {
39 let mut ctx = SQLContext::new();

Calls 1

setMethod · 0.80

Tested by

no test coverage detected