Skip to content

Add Builtin Checks for Polars Support #1408

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

Merged

Conversation

AndriiG13
Copy link
Contributor

@AndriiG13 AndriiG13 commented Nov 6, 2023

Added Polars builtin-checks as per effort to support Polars.

Implements #1421

TODO:

  • add tests for the rest of the checks

Signed-off-by: AndriiG13 <[email protected]>
@@ -87,7 +87,7 @@ def check_dtype(

if schema.dtype is not None:
obj_dtype = check_obj.schema[schema.name]
passed = obj_dtype is schema.dtype
passed = obj_dtype.is_(schema.dtype)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because some dtypes objects are in instantiated in the schema, for instance Duration(time_unit="us"), the is comparison doesn't work here. So I used the is_ method provided by the Polars DataType API instead

@cosmicBboy
Copy link
Collaborator

Looks great @AndriiG13 ! Let me know if you need any help with the type engine implementations.

@cosmicBboy cosmicBboy merged commit cc9cb6f into unionai-oss:polars-dev Nov 10, 2023
cosmicBboy pushed a commit that referenced this pull request Feb 20, 2024
cosmicBboy pushed a commit that referenced this pull request Feb 23, 2024
cosmicBboy pushed a commit that referenced this pull request Mar 11, 2024
cosmicBboy pushed a commit that referenced this pull request Mar 11, 2024
cosmicBboy pushed a commit that referenced this pull request Mar 15, 2024
max-raphael pushed a commit to max-raphael/pandera that referenced this pull request Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants