Skip to content

Commit

Permalink
fix: Fix repartitioning regression (#1564)
Browse files Browse the repository at this point in the history
Old code was **adding** the new partitions to the existing ones instead
of replacing them.
  • Loading branch information
AdamGS authored Dec 5, 2024
1 parent 8e754ad commit 4ad1851
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions vortex-datafusion/src/persistent/execution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,11 @@ impl ExecutionPlan for VortexExec {
let repartitioned_file_groups = repartition_by_count(file_groups, target_partitions);

let mut new_plan = self.clone();
let mut config = new_plan.file_scan_config;

let num_partitions = repartitioned_file_groups.len();

log::debug!("VortexExec repartitioned to {num_partitions} partitions");
config = config.with_file_groups(repartitioned_file_groups);
new_plan.file_scan_config = config;
new_plan.file_scan_config.file_groups = repartitioned_file_groups;
new_plan.plan_properties.partitioning = Partitioning::UnknownPartitioning(num_partitions);

Ok(Some(Arc::new(new_plan)))
Expand Down

0 comments on commit 4ad1851

Please sign in to comment.