MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / current_path

Method current_path

src/repr/src/explain/tracing.rs:304–317  ·  view source on GitHub ↗

Helper method: get a copy of the current path. If [`PlanTrace::filter`] is set, this will also check the current path against the `find` entry and return `None` if the two differ.

(&self)

Source from the content-addressed store, hash-verified

302 /// If [`PlanTrace::filter`] is set, this will also check the current path
303 /// against the `find` entry and return `None` if the two differ.
304 fn current_path(&self) -> Option<String> {
305 let path = self.path.lock().expect("path shouldn't be poisoned");
306 let path = path.as_str();
307 match self.filter.as_ref() {
308 Some(named_paths) => {
309 if named_paths.iter().any(|named| path == named.path()) {
310 Some(path.to_owned())
311 } else {
312 None
313 }
314 }
315 None => Some(path.to_owned()),
316 }
317 }
318}
319
320impl PlanTrace<UsedIndexes> {

Callers 1

pushMethod · 0.80

Calls 8

expectMethod · 0.80
lockMethod · 0.80
anyMethod · 0.80
as_strMethod · 0.45
as_refMethod · 0.45
iterMethod · 0.45
pathMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected