Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Jun 6, 2024
1 parent 2c03b8a commit f51326b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions core/src/execution/datafusion/expressions/negative.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -195,8 +194,8 @@ impl PhysicalExpr for NegativeExpr {
}
}

fn children(&self) -> Vec<Arc<dyn PhysicalExpr>> {
vec![self.arg.clone()]
fn children(&self) -> Vec<&Arc<dyn PhysicalExpr>> {
vec![&self.arg]
}

fn with_new_children(
Expand Down Expand Up @@ -255,8 +254,9 @@ 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<ExprProperties> {
let properties = children[0].clone().with_order(children[0].sort_properties);
Ok(properties)
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/execution/datafusion/expressions/unbound.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl PhysicalExpr for UnboundColumn {
internal_err!("UnboundColumn::evaluate() should not be called")
}

fn children(&self) -> Vec<Arc<dyn PhysicalExpr>> {
fn children(&self) -> Vec<&Arc<dyn PhysicalExpr>> {
vec![]
}

Expand Down

0 comments on commit f51326b

Please sign in to comment.