Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow concurrent file compaction #1383

Merged
merged 11 commits into from
Jun 3, 2023
Prev Previous commit
Next Next commit
remove old test
  • Loading branch information
wjones127 committed Jun 3, 2023
commit d7af3e707546e5c5ec155e5360d084582d3002ea
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