fn lookup_corresponding_component(
    expr: &MirScalarExpr,
    old_join_mapper: &JoinInputMapper,
    input_component_map: &HashMap<usize, usize>,
) -> Option<usize> {
    let mut dedupped = old_join_mapper
        .lookup_inputs(expr)
        .map(|i| input_component_map[&i])
        .collect::<HashSet<_>>();
    if dedupped.len() == 1 {
        dedupped.drain().next()
    } else {
        None
    }
}
/// Returns None if `expr` does not belong to exactly one component.
Returns None if `expr` does not belong to exactly one component.
Returns None if ` expr ` does not belong to exactly one component .
fn lookup_corresponding_component(
    expr: &MirScalarExpr,
    old_join_mapper: &JoinInputMapper,
    input_component_map: &HashMap<usize, usize>,
) -> Option<usize> {
    let mut dedupped = old_join_mapper
        .lookup_inputs(expr)
        .map(|i| input_component_map[&i])
        .collect::<HashSet<_>>();
    if dedupped.len() == 1 {
        dedupped.drain().next()
    } else {
        None
    }
}
fn lookup_corresponding_component ( expr : & MirScalarExpr , old_join_mapper : & JoinInputMapper , input_component_map : & HashMap < usize , usize > , ) -> Option < usize > { let mut dedupped = old_join_mapper . lookup_inputs ( expr ) . map ( | i | input_component_map [ & i ] ) . collect :: < HashSet < _ > > ( ) ; if dedupped . len ( ) == 1 { dedupped . drain ( ) . next ( ) } else { None } }
Returns None if `expr` does not belong to exactly one component.
Returns None if ` expr ` does not belong to exactly one component .
expr
&MirScalarExpr
old_join_mapper
&JoinInputMapper
input_component_map
&HashMap<usize, usize>
expr
&MirScalarExpr
old_join_mapper
&JoinInputMapper
input_component_map
&HashMap<usize, usize>