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

Removed limit from the test #5033

Merged
merged 3 commits into from
Mar 24, 2022

Conversation

razajafri
Copy link
Collaborator

@razajafri razajafri commented Mar 23, 2022

The order isn't guaranteed when using limit which causes the test to fail intermittently

  • Removed limit
  • added ignore_order

fixes #5021

Signed-off-by: Raza Jafri rjafri@nvidia.com

Signed-off-by: Raza Jafri <rjafri@nvidia.com>
@razajafri
Copy link
Collaborator Author

build

@@ -122,7 +122,7 @@ def test_cache_reverse_order(enable_vectorized_conf):
col1 = StructGen([['child0', byte_gen]])
def partial_return():
def partial_return_cache(spark):
return two_col_df(spark, col0, col1).select(f.col("a"), f.col("b")).cache().limit(50).select(f.col("b"), f.col("a"))
return two_col_df(spark, col0, col1).select(f.col("a"), f.col("b")).cache().select(f.col("b"), f.col("a"))
Copy link
Collaborator

@gerashegalov gerashegalov Mar 24, 2022

Choose a reason for hiding this comment

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

Is the order really guaranteed without limit? Adding @ignore_order test marker looks like a more intuitive solution to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That will only sort the collected list AFAIK which by the time it comes back to the driver is too late, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Or are you asking to add ignore_order in addition to the change? I can do that

Copy link
Collaborator

Choose a reason for hiding this comment

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

You are right about the local sort, but you can also say @ignore_order(local=False)

Copy link
Collaborator

Choose a reason for hiding this comment

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

and you are right about removing limit, since this ends up just sorting a non-deterministic subset instead of taking the head of a sorted list.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So, I would expect that to work but setting local=False still applies sort after the limit resulting in the test to fail.

As discussed offline, I will remove the limit and add ignore_order

@@ -178,7 +178,7 @@ else
export PYSP_TEST_spark_driver_extraClassPath="${ALL_JARS// /:}"
export PYSP_TEST_spark_executor_extraClassPath="${ALL_JARS// /:}"
export PYSP_TEST_spark_driver_extraJavaOptions="-ea -Duser.timezone=UTC $COVERAGE_SUBMIT_FLAGS"
export PYSP_TEST_spark_executor_extraJavaOptions='-ea -Duser.timezone=UTC'
export PYSP_TEST_spark_executor_extraJavaOptions="-ea -Duser.timezone=UTC $COVERAGE_SUBMIT_FLAGS_EXEC"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We have an issue for this: #4948 . It should be a separate PR.

@sameerz sameerz added the test Only impacts tests label Mar 24, 2022
@sameerz sameerz added this to the Mar 21 - Apr 1 milestone Mar 24, 2022
Signed-off-by: Raza Jafri <rjafri@nvidia.com>
Signed-off-by: Raza Jafri <rjafri@nvidia.com>
@razajafri
Copy link
Collaborator Author

build

@razajafri razajafri merged commit 2c4c91f into NVIDIA:branch-22.04 Mar 24, 2022
@razajafri razajafri deleted the SR-5021-cache-reverse branch May 11, 2022 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Only impacts tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] test_cache_reverse_order failed
3 participants