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

feat: Add assert_err and assert_warn #20100

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

coastalwhite
Copy link
Collaborator

This PR adds the assert_eq and assert_warn methods on LazyFrame and DataFrame. These methods take a set of (possibly named) properties and verify during execution that these properties hold for all values. If a property does not hold, it will throw an error or a warning, respectively.

These methods are currently unstable, but I think they can be marked as stable relatively quickly.

This PR adds the `assert_eq` and `assert_warn` methods on `LazyFrame` and
`DataFrame`. These methods take a set of (possibly named) properties and verify
during execution that these properties hold for all values. If a property does
not hold, it will throw an error or a warning, respectively.

These methods are currently unstable, but I think they can be marked as stable
relatively quickly.
@coastalwhite coastalwhite changed the title feat: Add assert_err and assert_warn. feat: Add assert_err and assert_warn Dec 2, 2024
@github-actions github-actions bot added enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars and removed title needs formatting labels Dec 2, 2024
@@ -278,6 +278,53 @@ fn create_physical_plan_impl(
streamable,
)))
},
Assert {
Copy link
Member

@ritchie46 ritchie46 Dec 2, 2024

Choose a reason for hiding this comment

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

I don't think it should be a top level node, but rather on MapFunction. Then most functionality will roll out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or an improvement of an existing feature python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants