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

Ignore the order locally for repartition tests #163

Merged
merged 2 commits into from
Jun 13, 2020
Merged
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions integration_tests/src/main/python/repart_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from asserts import assert_gpu_and_cpu_are_equal_collect
from data_gen import *
from marks import ignore_order

@pytest.mark.parametrize('data_gen', all_basic_gens, ids=idfn)
def test_union(data_gen):
Expand All @@ -37,6 +38,7 @@ def test_coalesce_df(num_parts, length):

@pytest.mark.parametrize('num_parts', [1, 10, 100, 1000, 2000], ids=idfn)
@pytest.mark.parametrize('length', [0, 2048, 4096], ids=idfn)
@ignore_order('local')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why local? local sort does not scale well. Is it because of floating point -0.0 vs 0.0 comparison. If so we should mark it as such with a comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, just try to avoid involving any extra operation on the input DataFrame to make the test pure, since sort on Spark will shuffle the data again as far as i know.
Verifed sort on Spark also has the test passed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you prefer, i can remove the 'local'

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The local sort is very slow compared to the distributed sort, and it does not scale for larger tests. I am fine with it being local, especially because this does deal with partitioning, but I would prefer a comment explaining why you picked local. Perhaps something like.

@ignore_order('local') # don't repartition again for sort

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to add that this is just a nit if you want to merge it in as-is that is fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Bobby, really a good suggestion, updated to add a comment.

def test_repartion_df(num_parts, length):
#This should change eventually to be more than just the basic gens
gen_list = [('_c' + str(i), gen) for i, gen in enumerate(all_basic_gens)]
Expand Down