Skip to content

Commit

Permalink
Fix dynamic runners sorting (#512)
Browse files Browse the repository at this point in the history
* Fixes #510 for dynamic runners
  • Loading branch information
jaychia committed Jan 26, 2023
1 parent 1ec273f commit afb933d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion daft/execution/execution_step.py
Expand Up @@ -347,7 +347,10 @@ def run(self, inputs: list[vPartition]) -> list[vPartition]:

def _reduce_to_quantiles(self, inputs: list[vPartition]) -> list[vPartition]:
merged = vPartition.merge_partitions(inputs, verify_partition_id=False)
merged_sorted = merged.sort(self.sort_by, descending=self.descending)

# Skip evaluation of expressions by converting to ColumnExpression, since evaluation was done in Sample
merged_sorted = merged.sort(self.sort_by.to_column_expressions(), descending=self.descending)

result = merged_sorted.quantiles(self.num_quantiles)
return [result]

Expand Down

0 comments on commit afb933d

Please sign in to comment.