MCPcopy Create free account
hub / github.com/apache/datafusion / datafusion_test_data

Function datafusion_test_data

datafusion/common/src/test_util.rs:212–217  ·  view source on GitHub ↗

Returns the datafusion test data directory, which is by default rooted at `datafusion/core/tests/data`. The default can be overridden by the optional environment variable `DATAFUSION_TEST_DATA` panics when the directory can not be found. Example: ``` let testdata = datafusion_common::test_util::datafusion_test_data(); let csvdata = format!("{}/window_1.csv", testdata); assert!(std::path::PathBu

()

Source from the content-addressed store, hash-verified

210/// assert!(std::path::PathBuf::from(csvdata).exists());
211/// ```
212pub fn datafusion_test_data() -> String {
213 match get_data_dir("DATAFUSION_TEST_DATA", "../../datafusion/core/tests/data") {
214 Ok(pb) => pb.display().to_string(),
215 Err(err) => panic!("failed to get arrow data dir: {err}"),
216 }
217}
218
219/// Returns the arrow test data directory, which is by default stored
220/// in a git submodule rooted at `testing/data`.

Calls 3

get_data_dirFunction · 0.85
to_stringMethod · 0.45
displayMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…