/// Return true if the given expression is in a primitive binary in the form: `column op constant`
// and op must be a comparison one
Return true if the given expression is in a primitive binary in the form: `column op constant`
and op must be a comparison one
Return true if the given expression is in a primitive binary in the form : ` column op constant ` and op must be a comparison one
pub fn primitive_binary_expr(expr: &Expr) -> bool {
        match expr {
            Expr::BinaryExpr { left, op, right } => {
                matches!(
                    (&**left, &**right),
                    (Expr::Column(_), Expr::Literal(_)) | (Expr::Literal(_), Expr::Column(_))
                ) && matches!(
                    op,
                    Operator::Eq
                        | Operator::NotEq
                        | Operator::Lt
                        | Operator::LtEq
                        | Operator::Gt
                        | Operator::GtEq
                )
            }
            _ => false,
        }
    }
pub fn primitive_binary_expr ( expr : & Expr ) -> bool { match expr { Expr :: BinaryExpr { left , op , right } => { matches ! ( ( left right ) ( Expr Column ( ) Expr Literal ( ) ) ( Expr Literal ( ) Expr Column ( ) ) ) && matches ! ( op Operator Eq Operator NotEq Operator Lt Operator LtEq Operator Gt Operator GtEq ) } _ => false , } }
Return true if the given expression is in a primitive binary in the form: `column op constant`
and op must be a comparison one
Return true if the given expression is in a primitive binary in the form : ` column op constant ` and op must be a comparison one
expr
&Expr