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

Fix test failure with Spark 3.3 by looking for less specific error message #5185

Merged
merged 2 commits into from
Apr 11, 2022
Merged
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
2 changes: 1 addition & 1 deletion integration_tests/src/main/python/arithmetic_ops_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def test_div_overflow_exception_when_ansi(expr, ansi_enabled):
assert_gpu_and_cpu_error(
df_fun=lambda spark: _get_div_overflow_df(spark, expr).collect(),
conf=ansi_conf,
error_message='java.lang.ArithmeticException: Overflow in integral divide')
error_message='ArithmeticException: Overflow in integral divide')
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the point to ensure we're throwing the same exception? As such I'd rather see this test check for the correct exception class based on the Spark version -- if Spark 3.3 throws a different exception for this, then our plugin should throw the same class for the same type of exception on Spark 3.3.

I'm OK if we want to do this as a followup to refine the test if we aren't already doing the correct behavior now. If we are, then this should choose a different message to check based on which Spark we're using as is done in other tests checking exception types.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's a good point. I filed #5196 as a follow-on.

else:
assert_gpu_and_cpu_are_equal_collect(
func=lambda spark: _get_div_overflow_df(spark, expr),
Expand Down