diff --git a/datafusion/physical-expr/src/sort_properties.rs b/datafusion/physical-expr/src/sort_properties.rs index f3d158c1a002..7b003f320846 100644 --- a/datafusion/physical-expr/src/sort_properties.rs +++ b/datafusion/physical-expr/src/sort_properties.rs @@ -158,7 +158,7 @@ impl ExprOrdering { /// Creates a new [`ExprOrdering`] with [`SortProperties::Unordered`] states /// for `expr` and its children. pub fn new(expr: Arc) -> Self { - let children = PhysicalExpr::children(expr.as_ref()); + let children = expr.children(); Self { expr, state: Default::default(), diff --git a/datafusion/physical-expr/src/utils/mod.rs b/datafusion/physical-expr/src/utils/mod.rs index fc59e716487b..35a1cec7c49e 100644 --- a/datafusion/physical-expr/src/utils/mod.rs +++ b/datafusion/physical-expr/src/utils/mod.rs @@ -136,7 +136,7 @@ pub struct ExprTreeNode { impl ExprTreeNode { pub fn new(expr: Arc) -> Self { - let children = PhysicalExpr::children(expr.as_ref()); + let children = expr.children(); ExprTreeNode { expr, data: None,