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

Support raise_error() on [databricks] 14.3, Spark 4. #11969

Open
wants to merge 4 commits into
base: branch-25.02
Choose a base branch
from

Conversation

mythrocks
Copy link
Collaborator

Fixes #10969.

This commit adds support for raise_error() on Databricks 14.3 and Spark 4.0.

On these new Spark versions, the RaiseError expression (that powers the raise_error() API function) was changed from a Unary expression to a Binary one. This was done without modifying the arity of raise_error(). The ostensible reason seems to have been to eventually allow user-code to raise custom errors via raise_error().

This commit allows raise_error() to work on the GPU as it currently does on the CPU: as a unary function powered by a binary expression in the background.

The tests have been modified to verify both the new behaviour and the legacy one on new platforms, while continuing to run as before on legacy platforms.

Fixes NVIDIA#10969.

This commit adds support for `raise_error()` on Databricks 14.3 and
Spark 4.0.

On these new Spark versions, the `RaiseError` expression (that powers
the `raise_error()` API function) was changed from a Unary expression to
a Binary one.  This was done without modifying the arity of
`raise_error()`.  The ostensible reason seems to have been to eventually allow
user-code to raise custom errors via `raise_error()`.

This commit allows `raise_error()` to work on the GPU as it currently
does on the CPU:  as a unary function powered by a binary expression in
the background.

The tests have been modified to verify both the new behaviour and the
legacy one on new platforms, while continuing to run as before on legacy
platforms.

Signed-off-by: MithunR <[email protected]>
@mythrocks mythrocks added the feature request New feature or request label Jan 16, 2025
@mythrocks mythrocks self-assigned this Jan 16, 2025
razajafri
razajafri previously approved these changes Jan 16, 2025
Copy link
Collaborator

@razajafri razajafri left a comment

Choose a reason for hiding this comment

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

I like how you have created the MapData

@mythrocks mythrocks changed the title Support raise_error() on Databricks 14.3, Spark 4. Support raise_error() on [databricks] 14.3, Spark 4. Jan 16, 2025
@mythrocks
Copy link
Collaborator Author

Build

@mythrocks
Copy link
Collaborator Author

Build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Support RaiseError for DB 14.3 and Spark 4.0.0
2 participants