Skip to content

Commit c8ee8c0

Browse files
committed
Adjust to use match
1 parent 3035fb7 commit c8ee8c0

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

datafusion/sql/src/unparser/expr.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ impl Unparser<'_> {
148148
))))
149149
}
150150
Expr::Column(col) => self.col_to_sql(col),
151-
Expr::BinaryExpr(BinaryExpr { left, op, right })
152-
if *op == Operator::IsDistinctFrom =>
153-
{
151+
Expr::BinaryExpr(BinaryExpr {
152+
left,
153+
op: Operator::IsDistinctFrom,
154+
right,
155+
}) => {
154156
let l = self.expr_to_sql_inner(left.as_ref())?;
155157
let r = self.expr_to_sql_inner(right.as_ref())?;
156158

@@ -159,9 +161,11 @@ impl Unparser<'_> {
159161
Box::new(r),
160162
))))
161163
}
162-
Expr::BinaryExpr(BinaryExpr { left, op, right })
163-
if *op == Operator::IsNotDistinctFrom =>
164-
{
164+
Expr::BinaryExpr(BinaryExpr {
165+
left,
166+
op: Operator::IsNotDistinctFrom,
167+
right,
168+
}) => {
165169
let l = self.expr_to_sql_inner(left.as_ref())?;
166170
let r = self.expr_to_sql_inner(right.as_ref())?;
167171

0 commit comments

Comments
 (0)