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

Method single_input

src/expr/src/relation/join_input_mapper.rs:238–246  ·  view source on GitHub ↗

Returns the index of the only input referenced in the given expression.

(&self, expr: &impl Columns)

Source from the content-addressed store, hash-verified

236
237 /// Returns the index of the only input referenced in the given expression.
238 pub fn single_input(&self, expr: &impl Columns) -> Option<usize> {
239 let mut inputs = self.lookup_inputs(expr);
240 if let Some(first_input) = inputs.next() {
241 if inputs.next().is_none() {
242 return Some(first_input);
243 }
244 }
245 None
246 }
247
248 /// Returns whether the given expr refers to columns of only the `index`th input.
249 pub fn is_localized(&self, expr: &impl Columns, index: usize) -> bool {

Callers 3

is_localizedMethod · 0.80
find_redundancyFunction · 0.80
semijoin_bijectionFunction · 0.80

Calls 3

lookup_inputsMethod · 0.80
is_noneMethod · 0.80
nextMethod · 0.45

Tested by

no test coverage detected