Skip to content

Commit b9bfcf7

Browse files
committed
Remove input_sorted_by_group_key
1 parent e0804f8 commit b9bfcf7

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

datafusion/src/physical_plan/planner.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,26 +1679,6 @@ pub fn evaluate_const(expr: Arc<dyn PhysicalExpr>) -> Result<Arc<dyn PhysicalExp
16791679
Ok(Arc::new(Literal::new(scalar)))
16801680
}
16811681

1682-
// TODO: Remove
1683-
fn input_sorted_by_group_key(
1684-
input: &dyn ExecutionPlan,
1685-
group_key: &[(Arc<dyn PhysicalExpr>, String)],
1686-
sort_order: &mut Vec<usize>,
1687-
) -> bool {
1688-
let sortedness = input_sortedness_by_group_key(input, group_key);
1689-
sort_order.clear();
1690-
if sortedness.is_sorted_by_group_key() {
1691-
sort_order.extend(
1692-
sortedness.sort_order[0]
1693-
.iter()
1694-
.map(|&(_sort_key, group_key)| group_key),
1695-
);
1696-
true
1697-
} else {
1698-
false
1699-
}
1700-
}
1701-
17021682
#[derive(Debug, Clone)]
17031683
/// Return value of input_sortedness_by_group_key. If succeeded, every group key offset appears in
17041684
/// sort_order or unsorted exactly once.
@@ -2177,15 +2157,6 @@ mod tests {
21772157
physical_group_key.push((phys_expr, "".to_owned()));
21782158
}
21792159

2180-
let mut sort_order = Vec::<usize>::new();
2181-
let is_sorted: bool = input_sorted_by_group_key(
2182-
execution_plan.as_ref(),
2183-
&physical_group_key,
2184-
&mut sort_order,
2185-
);
2186-
assert!(is_sorted);
2187-
assert_eq!(sort_order, vec![0, 1, 2, 3, 4]);
2188-
21892160
let sortedness =
21902161
input_sortedness_by_group_key(execution_plan.as_ref(), &physical_group_key);
21912162
assert!(sortedness.succeeded);

0 commit comments

Comments
 (0)