Skip to content

Commit

Permalink
reinstate down_cast_any_ref (#13705)
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrove authored Dec 9, 2024
1 parent b73734f commit 6fae5a0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions datafusion/physical-expr-common/src/physical_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]`
Expand Down

0 comments on commit 6fae5a0

Please sign in to comment.