Skip to content

Commit

Permalink
Refactor debug assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
mickvangelderen committed Mar 21, 2024
1 parent 2532241 commit a0194c9
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions crates/polars-lazy/src/physical_plan/executors/scan/ipc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,10 @@ fn finish_index_and_dfs(
) -> PolarsResult<DataFrame> {
index_and_dfs.sort_unstable_by(|(a, _), (b, _)| a.cmp(b));

#[cfg(debug_assertions)]
{
assert!(
index_and_dfs.iter().enumerate().all(|(a, &(b, _))| a == b),
"expected dataframe indices in order from 0 to len"
);
}
debug_assert!(
index_and_dfs.iter().enumerate().all(|(a, &(b, _))| a == b),
"expected dataframe indices in order from 0 to len"
);

debug_assert_eq!(index_and_dfs.len(), row_counter.counts.len());
let mut offset = 0;
Expand Down

0 comments on commit a0194c9

Please sign in to comment.