fn uniqueness(expr: &MirScalarExpr) -> Option<usize> {
                        match expr {
                            MirScalarExpr::CallUnary { func, expr } => {
                                if func.preserves_uniqueness() {
                                    uniqueness(expr)
                                } else {
                                    None
                                }
                            }
                            MirScalarExpr::Column(c) => Some(*c),
                            _ => None,
                        }
                    }
// assess whether the scalar preserves uniqueness,
// and could participate in a key!
assess whether the scalar preserves uniqueness,
and could participate in a key!
assess whether the scalar preserves uniqueness and could participate in a key!
fn uniqueness(expr: &MirScalarExpr) -> Option<usize> {
                        match expr {
                            MirScalarExpr::CallUnary { func, expr } => {
                                if func.preserves_uniqueness() {
                                    uniqueness(expr)
                                } else {
                                    None
                                }
                            }
                            MirScalarExpr::Column(c) => Some(*c),
                            _ => None,
                        }
                    }
fn uniqueness ( expr : & MirScalarExpr ) -> Option < usize > { match expr { MirScalarExpr :: CallUnary { func , expr } => { if func . preserves_uniqueness ( ) { uniqueness ( expr ) } else { None } } MirScalarExpr :: Column ( c ) => Some ( * c ) , _ => None , } }
assess whether the scalar preserves uniqueness,
and could participate in a key!
assess whether the scalar preserves uniqueness and could participate in a key!
expr
&MirScalarExpr
expr
&MirScalarExpr