Skip to content

Commit 7566a1e

Browse files
committed
fmt
1 parent afe96b0 commit 7566a1e

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

datafusion/expr/src/logical_plan/plan.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2664,7 +2664,8 @@ impl TableScan {
26642664
fetch: Option<usize>,
26652665
preferred_ordering: Option<Vec<SortExpr>>,
26662666
) -> Result<Self> {
2667-
let mut table_scan = Self::try_new(table_name, table_source, projection, filters, fetch)?;
2667+
let mut table_scan =
2668+
Self::try_new(table_name, table_source, projection, filters, fetch)?;
26682669
table_scan.preferred_ordering = preferred_ordering;
26692670
Ok(table_scan)
26702671
}

datafusion/optimizer/src/push_down_sort.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ impl PushDownSort {
4444
}
4545

4646
/// Checks if a sort expression can be pushed down to a table scan.
47-
///
47+
///
4848
/// Currently, we only support pushing down simple column references
4949
/// because table providers typically can't optimize complex expressions
5050
/// in sort pushdown.
@@ -108,7 +108,7 @@ impl OptimizerRule for PushDownSort {
108108
// The table provider may or may not be able to satisfy the ordering,
109109
// but that's up to the table provider to decide
110110
let new_plan = LogicalPlan::TableScan(new_table_scan);
111-
111+
112112
Ok(Transformed::yes(new_plan))
113113
}
114114

@@ -129,11 +129,7 @@ mod tests {
129129
assert!(PushDownSort::can_pushdown_sort_expr(&sort_expr));
130130

131131
// Complex expression should not be pushable
132-
let sort_expr = SortExpr::new(
133-
col("a") + col("b"),
134-
true,
135-
false
136-
);
132+
let sort_expr = SortExpr::new(col("a") + col("b"), true, false);
137133
assert!(!PushDownSort::can_pushdown_sort_expr(&sort_expr));
138134
}
139135

@@ -142,4 +138,4 @@ mod tests {
142138
let rule = PushDownSort::new();
143139
assert_eq!(rule.name(), "push_down_sort");
144140
}
145-
}
141+
}

0 commit comments

Comments
 (0)