Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoly Myachev <[email protected]>
  • Loading branch information
anmyachev committed May 12, 2024
1 parent d60e0cf commit eb65291
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion modin/core/storage_formats/pandas/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def map_func(left, right): # pragma: no cover
else new_left.sort_rows_by_column_values(on)
)

return new_left if keep_index else new_left.reset_index(drop=True)
return (
new_left if keep_index or not sort else new_left.reset_index(drop=True)
)
else:
return left.default_to_pandas(pandas.DataFrame.merge, right, **kwargs)

Expand Down
2 changes: 1 addition & 1 deletion modin/tests/pandas/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ def sort_if_range_partitioning(df1, df2, comparator=None, force=False):
if comparator is None:
comparator = df_equals

if force and (RangePartitioning.get() or use_range_partitioning_groupby()):
if force or (RangePartitioning.get() or use_range_partitioning_groupby()):
df1, df2 = sort_data(df1), sort_data(df2)

comparator(df1, df2)
Expand Down

0 comments on commit eb65291

Please sign in to comment.