Fix fields cannot find bug
@@ -174,10 +174,14 @@ impl Expression {
}
},
Expression::UnaryExpression { op, expr } => {
- format!("({} {})", op, expr.column_name())
- }
- Expression::BinaryExpression { op, left, right } => {
- format!("({} {} {})", left.column_name(), op, right.column_name())
+ format!("({} {})", op.to_lowercase(), expr.column_name())
+ }
+ Expression::BinaryExpression { op, left, right } => {format!(
+ "({} {} {})",
+ left.column_name(),
+ op.to_lowercase(),
+ right.column_name()
+ )
}
Expression::ScalarFunction { op, args } => {
match OP_SET.get(&op.to_lowercase().as_ref()) {
