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

Function lookup_replacement_value

benchmarks/src/sql_benchmark.rs:1403–1414  ·  view source on GitHub ↗
(
    key: &str,
    replacement_map: &HashMap<String, String>,
    get_env: &impl Fn(&str) -> Option<String>,
)

Source from the content-addressed store, hash-verified

1401}
1402
1403fn lookup_replacement_value(
1404 key: &str,
1405 replacement_map: &HashMap<String, String>,
1406 get_env: &impl Fn(&str) -> Option<String>,
1407) -> Option<String> {
1408 if let Some(v) = replacement_map.get(&key.to_lowercase()) {
1409 return Some(v.to_string());
1410 }
1411
1412 // look in env variables
1413 get_env(&key.to_uppercase())
1414}
1415
1416fn read_query_from_reader(
1417 reader: &mut BenchmarkFileReader,

Callers 1

Calls 2

getMethod · 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…