diff --git a/core/src/execution/datafusion/expressions/negative.rs b/core/src/execution/datafusion/expressions/negative.rs index e7aa2ac646..2f9cad573d 100644 --- a/core/src/execution/datafusion/expressions/negative.rs +++ b/core/src/execution/datafusion/expressions/negative.rs @@ -24,9 +24,8 @@ use datafusion::{ physical_expr::PhysicalExpr, }; use datafusion_common::{Result, ScalarValue}; -use datafusion_physical_expr::{ - aggregate::utils::down_cast_any_ref, sort_properties::SortProperties, -}; +use datafusion_expr::sort_properties::ExprProperties; +use datafusion_physical_expr::aggregate::utils::down_cast_any_ref; use std::{ any::Any, hash::{Hash, Hasher}, @@ -195,8 +194,8 @@ impl PhysicalExpr for NegativeExpr { } } - fn children(&self) -> Vec> { - vec![self.arg.clone()] + fn children(&self) -> Vec<&Arc> { + vec![&self.arg] } fn with_new_children( @@ -255,8 +254,11 @@ impl PhysicalExpr for NegativeExpr { } /// The ordering of a [`NegativeExpr`] is simply the reverse of its child. - fn get_ordering(&self, children: &[SortProperties]) -> SortProperties { - -children[0] + fn get_properties(&self, children: &[ExprProperties]) -> Result { + let properties = children[0] + .clone() + .with_order(children[0].sort_properties.clone()); + Ok(properties) } } diff --git a/core/src/execution/datafusion/expressions/unbound.rs b/core/src/execution/datafusion/expressions/unbound.rs index 5387b10125..95f9912c98 100644 --- a/core/src/execution/datafusion/expressions/unbound.rs +++ b/core/src/execution/datafusion/expressions/unbound.rs @@ -83,7 +83,7 @@ impl PhysicalExpr for UnboundColumn { internal_err!("UnboundColumn::evaluate() should not be called") } - fn children(&self) -> Vec> { + fn children(&self) -> Vec<&Arc> { vec![] }