Skip to content

Commit

Permalink
remove old test
Browse files Browse the repository at this point in the history
  • Loading branch information
wjones127 committed May 28, 2023
1 parent d2029e6 commit d208728
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 32 deletions.
29 changes: 0 additions & 29 deletions rust/src/delta_arrow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,33 +1012,4 @@ mod tests {
));
let _converted: schema::SchemaField = field.as_ref().try_into().unwrap();
}

#[test]
fn test_estimated_row_size() {
let schema = ArrowSchema::new(vec![
ArrowField::new("a", ArrowDataType::Int32, true),
ArrowField::new(
"b",
ArrowDataType::Struct(
vec![
ArrowField::new("c", ArrowDataType::Utf8, true),
ArrowField::new("d", ArrowDataType::Date32, true),
]
.into(),
),
true,
),
]);
let variable_width_guess = 8;
assert_eq!(
estimated_row_size(&schema, variable_width_guess),
4 + 4 + variable_width_guess
);

let variable_width_guess = 100;
assert_eq!(
estimated_row_size(&schema, variable_width_guess),
4 + 4 + variable_width_guess
);
}
}
4 changes: 2 additions & 2 deletions rust/src/operations/optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,8 @@ impl MergePlan {
.fold(MetricDetails::default(), |mut curr, file| {
curr.total_files += 1;
curr.total_size += file.size as i64;
curr.max = std::cmp::max(files_removed.max, file.size as i64);
curr.min = std::cmp::min(files_removed.min, file.size as i64);
curr.max = std::cmp::max(curr.max, file.size as i64);
curr.min = std::cmp::min(curr.min, file.size as i64);
curr
});

Expand Down
2 changes: 1 addition & 1 deletion rust/tests/command_optimize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ async fn test_idempotent_metrics() -> Result<(), Box<dyn Error>> {
num_batches: 0,
total_considered_files: 1,
total_files_skipped: 1,
preserve_insertion_order: false,
preserve_insertion_order: true,
files_added: expected_metric_details.clone(),
files_removed: expected_metric_details,
};
Expand Down

0 comments on commit d208728

Please sign in to comment.