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

Function tpch_queries

datafusion/core/tests/sql/unparser.rs:129–142  ·  view source on GitHub ↗

Collect SQL for TPC-H queries.

()

Source from the content-addressed store, hash-verified

127
128/// Collect SQL for TPC-H queries.
129fn tpch_queries() -> Vec<TestQuery> {
130 let mut queries = vec![];
131 for path in BENCHMARK_PATHS {
132 let dir = format!("{path}queries/");
133 println!("Reading TPC-H queries from {dir}");
134 if let Ok(dir) = std::fs::read_dir(dir) {
135 let read = iterate_queries(dir);
136 queries.extend(read);
137 }
138 }
139 println!("Total TPC-H queries found: {}", queries.len());
140 queries.sort_unstable_by_key(|q| q.name.clone());
141 queries
142}
143
144/// Create a new SessionContext for testing that has all Clickbench tables registered.
145///

Callers 1

Calls 4

read_dirFunction · 0.85
iterate_queriesFunction · 0.85
extendMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…