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/datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new 6fae5a078b reinstate down_cast_any_ref (#13705)
6fae5a078b is described below
commit 6fae5a078b43466ea6f2ecd47e521744dff8e384
Author: Andy Grove <[email protected]>
AuthorDate: Mon Dec 9 14:49:58 2024 -0700
reinstate down_cast_any_ref (#13705)
---
datafusion/physical-expr-common/src/physical_expr.rs | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/datafusion/physical-expr-common/src/physical_expr.rs
b/datafusion/physical-expr-common/src/physical_expr.rs
index 93bdcdef8e..c2e892d63d 100644
--- a/datafusion/physical-expr-common/src/physical_expr.rs
+++ b/datafusion/physical-expr-common/src/physical_expr.rs
@@ -214,6 +214,21 @@ pub fn with_new_children_if_necessary(
}
}
+#[deprecated(since = "44.0.0")]
+pub fn down_cast_any_ref(any: &dyn Any) -> &dyn Any {
+ if any.is::<Arc<dyn PhysicalExpr>>() {
+ any.downcast_ref::<Arc<dyn PhysicalExpr>>()
+ .unwrap()
+ .as_any()
+ } else if any.is::<Box<dyn PhysicalExpr>>() {
+ any.downcast_ref::<Box<dyn PhysicalExpr>>()
+ .unwrap()
+ .as_any()
+ } else {
+ any
+ }
+}
+
/// Returns [`Display`] able a list of [`PhysicalExpr`]
///
/// Example output: `[a + 1, b]`
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]