Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jatin510 committed Nov 3, 2024
1 parent 09e81fb commit 1ac5cb3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions datafusion/physical-plan/src/repartition/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ impl BatchPartitioner {
/// Paper](https://w6113.github.io/files/papers/volcanoparallelism-89.pdf)
/// which uses the term "Exchange" for the concept of repartitioning
/// data across threads.
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct RepartitionExec {
/// Input execution plan
input: Arc<dyn ExecutionPlan>,
Expand Down Expand Up @@ -745,8 +745,8 @@ impl RepartitionExec {
/// and the node remains a `RepartitionExec`.
pub fn with_preserve_order(mut self) -> Self {
self.preserve_order =
// If the input isn't ordered, there is no ordering to preserve
self.input.output_ordering().is_some() &&
// If the input isn't ordered, there is no ordering to preserve
self.input.output_ordering().is_some() &&
// if there is only one input partition, merging is not required
// to maintain order
self.input.output_partitioning().partition_count() > 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,7 @@ mod tests {
Arc::new(BuiltInWindowExpr::new(
last_value_func,
&[],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(WindowFrame::new_bounds(
WindowFrameUnits::Rows,
WindowFrameBound::Preceding(ScalarValue::UInt64(None)),
Expand All @@ -1563,7 +1563,7 @@ mod tests {
Arc::new(BuiltInWindowExpr::new(
nth_value_func1,
&[],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(WindowFrame::new_bounds(
WindowFrameUnits::Rows,
WindowFrameBound::Preceding(ScalarValue::UInt64(None)),
Expand All @@ -1574,7 +1574,7 @@ mod tests {
Arc::new(BuiltInWindowExpr::new(
nth_value_func2,
&[],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(WindowFrame::new_bounds(
WindowFrameUnits::Rows,
WindowFrameBound::Preceding(ScalarValue::UInt64(None)),
Expand Down
4 changes: 2 additions & 2 deletions datafusion/physical-plan/src/windows/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ mod tests {
"count".to_owned(),
&[col("a", &schema)?],
&[],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(WindowFrame::new(None)),
schema.as_ref(),
false,
Expand Down Expand Up @@ -1072,7 +1072,7 @@ mod tests {
}

assert_eq!(
get_window_mode(&partition_by_exprs, &order_by_exprs, &exec_unbounded),
get_window_mode(&partition_by_exprs, order_by_exprs.as_ref(), &exec_unbounded),
*expected,
"Unexpected result for in unbounded test case#: {case_idx:?}, case: {test_case:?}"
);
Expand Down
8 changes: 4 additions & 4 deletions datafusion/proto/tests/cases/roundtrip_physical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ fn roundtrip_window() -> Result<()> {
.build()
.map(Arc::new)?,
&[],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(WindowFrame::new(None)),
));

Expand All @@ -329,7 +329,7 @@ fn roundtrip_window() -> Result<()> {
let sliding_aggr_window_expr = Arc::new(SlidingAggregateWindowExpr::new(
sum_expr,
&[],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(window_frame),
));

Expand Down Expand Up @@ -1015,7 +1015,7 @@ fn roundtrip_scalar_udf_extension_codec() -> Result<()> {
vec![Arc::new(PlainAggregateWindowExpr::new(
aggr_expr.clone(),
&[col("author", &schema)?],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(WindowFrame::new(None)),
))],
filter,
Expand Down Expand Up @@ -1076,7 +1076,7 @@ fn roundtrip_aggregate_udf_extension_codec() -> Result<()> {
vec![Arc::new(PlainAggregateWindowExpr::new(
aggr_expr,
&[col("author", &schema)?],
&LexOrdering::default(),
LexOrdering::default().as_ref(),
Arc::new(WindowFrame::new(None)),
))],
filter,
Expand Down

0 comments on commit 1ac5cb3

Please sign in to comment.