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

Function create_temp_json

datafusion/core/src/datasource/file_format/json.rs:60–65  ·  view source on GitHub ↗

Create a temporary JSON file and return (TempDir, path)

(content: &str)

Source from the content-addressed store, hash-verified

58
59 /// Create a temporary JSON file and return (TempDir, path)
60 fn create_temp_json(content: &str) -> (tempfile::TempDir, String) {
61 let tmp_dir = tempfile::TempDir::new().unwrap();
62 let path = tmp_dir.path().join("test.json");
63 std::fs::write(&path, content).unwrap();
64 (tmp_dir, path.to_string_lossy().to_string())
65 }
66
67 /// Infer schema from JSON array format file
68 async fn infer_json_array_schema(

Callers 2

infer_json_array_schemaFunction · 0.85
query_json_arrayFunction · 0.85

Calls 4

newFunction · 0.85
joinMethod · 0.45
pathMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…