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

Function parser_accepts_include_file

benchmarks/src/sql_benchmark.rs:2035–2056  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2033
2034 #[tokio::test]
2035 async fn parser_accepts_include_file() {
2036 let temp_dir = tempdir().expect("failed to create benchmark test directory");
2037 let include_path =
2038 write_test_file(&temp_dir, "include.benchmark", "run\nselect 1\n");
2039
2040 let benchmark_path = write_test_file(
2041 &temp_dir,
2042 "include_driver.benchmark",
2043 &format!("include {}\n", include_path.display()),
2044 );
2045
2046 let result = parse_benchmark_file(&benchmark_path).await;
2047
2048 let benchmark = result.expect("benchmark should parse");
2049 assert_eq!(
2050 benchmark
2051 .queries()
2052 .get(&QueryDirective::Run)
2053 .expect("run query"),
2054 &vec!["select 1".to_string()]
2055 );
2056 }
2057
2058 #[tokio::test]
2059 async fn parser_accepts_template_file_with_parameters() {

Callers

nothing calls this directly

Calls 2

write_test_fileFunction · 0.85
parse_benchmark_fileFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…