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

BUG: merge performance issue caused by DataFrameAutoMergeMixin #740

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/xorbits/_mars/dataframe/base/cartesian_chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@ def tile(cls, op: "DataFrameCartesianChunk"):
auto_merge_threshold = op.auto_merge_threshold
auto_merge_before, auto_merge_after = cls._get_auto_merge_options(op.auto_merge)

yield from cls._merge_before(
merge_before_res = yield from cls._merge_before(
op, auto_merge_before, auto_merge_threshold, left, right, logger
)
left, right = merge_before_res[0], merge_before_res[1]

if left.ndim == 2 and left.chunk_shape[1] > 1:
if has_unknown_shape(left):
Expand Down
1 change: 1 addition & 0 deletions python/xorbits/_mars/dataframe/base/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def _merge_before(
right.shape,
len(right.chunks),
)
return [left, right]

@classmethod
def _merge_after(
Expand Down
3 changes: 2 additions & 1 deletion python/xorbits/_mars/dataframe/merge/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,9 +744,10 @@
auto_merge_threshold = op.auto_merge_threshold
auto_merge_before, auto_merge_after = cls._get_auto_merge_options(op.auto_merge)

yield from cls._merge_before(
merge_before_res = yield from cls._merge_before(

Check warning on line 747 in python/xorbits/_mars/dataframe/merge/merge.py

View check run for this annotation

Codecov / codecov/patch

python/xorbits/_mars/dataframe/merge/merge.py#L747

Added line #L747 was not covered by tests
op, auto_merge_before, auto_merge_threshold, left, right, logger
)
left, right = merge_before_res[0], merge_before_res[1]

Check warning on line 750 in python/xorbits/_mars/dataframe/merge/merge.py

View check run for this annotation

Codecov / codecov/patch

python/xorbits/_mars/dataframe/merge/merge.py#L750

Added line #L750 was not covered by tests

method = cls._choose_merge_method(op, left, right)
if cls._if_apply_bloom_filter(method, op, left, right):
Expand Down
Loading