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 collection_ops_tests for Spark 4.0 [databricks] #11414

Open
wants to merge 8 commits into
base: branch-24.12
Choose a base branch
from

Conversation

mythrocks
Copy link
Collaborator

Fixes #11011.

This commit fixes the failures in collection_ops_tests on Spark 4.0.

On all versions of Spark, when a Sequence is collected with rows that exceed MAX_INT,
an exception is thrown indicating that the collected Sequence/array is
larger than permissible. The different versions of Spark vary in the
contents of the exception message.

On Spark 4, one sees that the error message now contains more
information than all prior versions, including:

  1. The name of the op causing the error.
  2. The errant sequence size.

This commit introduces a shim to make this new information available in
the exception.

Note that this shim does not fit cleanly in RapidsErrorUtils, because
there are differences within major Spark versions. For instance, Spark
3.4.0-1 have a different message as compared to 3.4.2 and 3.4.3.
Likewise, the differences in 3.5.0, 3.5.1, 3.5.2.

@mythrocks mythrocks self-assigned this Aug 30, 2024
@mythrocks mythrocks added the Spark 4.0+ Spark 4.0+ issues label Aug 30, 2024
Fixes NVIDIA#11011.

This commit fixes the failures in `collection_ops_tests` on Spark 4.0.

On all versions of Spark, when a Sequence is collected with rows that exceed MAX_INT,
an exception is thrown indicating that the collected Sequence/array is
larger than permissible. The different versions of Spark vary in the
contents of the exception message.

On Spark 4, one sees that the error message now contains more
information than all prior versions, including:
1. The name of the op causing the error
2. The errant sequence size

This commit introduces a shim to make this new information available in
the exception.

Note that this shim does not fit cleanly in RapidsErrorUtils, because
there are differences within major Spark versions. For instance, Spark
3.4.0-1 have a different message as compared to 3.4.2 and 3.4.3.
Likewise, the differences in 3.5.0, 3.5.1, 3.5.2.

Signed-off-by: MithunR <mithunr@nvidia.com>
@mythrocks
Copy link
Collaborator Author

Build

This moves the construction of the long-sequence error strings into
RapidsErrorUtils.  The process involved introducing many new RapidsErrorUtils
classes, and using mix-ins of concrete implementations for the error-string
construction.
@mythrocks mythrocks changed the base branch from branch-24.10 to branch-24.12 September 28, 2024 02:02
@mythrocks
Copy link
Collaborator Author

Apologies for the noise. I had to rebase this to target branch-24.12, which then caused a lot of new reviewers to be added.

@razajafri is already examining this change. The others can ignore this.

@mythrocks
Copy link
Collaborator Author

Build

@mythrocks mythrocks changed the title Fix collection_ops_tests for Spark 4.0 Fix collection_ops_tests for Spark 4.0 [databricks] Sep 28, 2024
@mythrocks
Copy link
Collaborator Author

Build

@mythrocks
Copy link
Collaborator Author

I've addressed the code formatting suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Spark 4.0+ Spark 4.0+ issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix tests failures in collection_ops_test.py
2 participants