This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 851bc7de85 explicitly list out all Expr types (#9038)
851bc7de85 is described below
commit 851bc7de850d0261202b18641561c8bd09abe588
Author: junxiangMu <[email protected]>
AuthorDate: Tue Jan 30 05:00:28 2024 +0800
explicitly list out all Expr types (#9038)
---
datafusion/optimizer/src/analyzer/type_coercion.rs | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/datafusion/optimizer/src/analyzer/type_coercion.rs
b/datafusion/optimizer/src/analyzer/type_coercion.rs
index c0dad2ef40..c9ecb2a770 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),
}
}
}