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

Method query_value

datafusion/spark/src/function/url/parse_url.rs:171–179  ·  view source on GitHub ↗
(query: Option<&'a str>, key: &str)

Source from the content-addressed store, hash-verified

169 }
170
171 fn query_value<'a>(query: Option<&'a str>, key: &str) -> Option<&'a str> {
172 query.and_then(|query| {
173 query
174 .split('&')
175 .filter_map(|pair| pair.split_once('='))
176 .find(|(query_key, _)| *query_key == key)
177 .map(|(_, value)| value)
178 })
179 }
180}
181
182impl ScalarUDFImpl for ParseUrl {

Callers

nothing calls this directly

Calls 2

mapMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected