diff --git a/datafusion/optimizer/src/analyzer/type_coercion.rs b/datafusion/optimizer/src/analyzer/type_coercion.rs index c0dad2ef4006..c9ecb2a77055 100644 --- a/datafusion/optimizer/src/analyzer/type_coercion.rs +++ b/datafusion/optimizer/src/analyzer/type_coercion.rs @@ -414,7 +414,22 @@ impl TreeNodeRewriter for TypeCoercionRewriter { )); Ok(expr) } - expr => Ok(expr), + Expr::Alias(_) + | Expr::Column(_) + | Expr::ScalarVariable(_, _) + | Expr::Literal(_) + | Expr::SimilarTo(_) + | Expr::IsNotNull(_) + | Expr::IsNull(_) + | Expr::Negative(_) + | Expr::GetIndexedField(_) + | Expr::Cast(_) + | Expr::TryCast(_) + | Expr::Sort(_) + | Expr::Wildcard { .. } + | Expr::GroupingSet(_) + | Expr::Placeholder(_) + | Expr::OuterReferenceColumn(_, _) => Ok(expr), } } }