Skip to content

Commit

Permalink
remove "nulls_first" from the dataframe api
Browse files Browse the repository at this point in the history
  • Loading branch information
universalmind303 committed Nov 15, 2024
1 parent f6593b9 commit ae9d2d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions daft/execution/execution_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,11 +927,13 @@ def run(self, inputs: list[MicroPartition]) -> list[MicroPartition]:

def _reduce_to_quantiles(self, inputs: list[MicroPartition]) -> list[MicroPartition]:
merged = MicroPartition.concat(inputs)

nulls_first = self.nulls_first if self.nulls_first is not None else self.descending

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

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

0 comments on commit ae9d2d1

Please sign in to comment.