Skip to content

Conversation

@cosmicBboy
Copy link
Collaborator

Fixes #1528

This PR modifies the default PANDERA_VALIDATION_DEPTH environment setting to None. This allows for setting default validation behavior for the polars backend. If the environment variable is not set, then LazyFrame doesn't perform any data-level validation. It will only check schema-level properties of the LazyFrame. This behavior can be overriden by explicitly setting export PANDERA_VALIDATION_DEPTH=SCHEMA_AND_DATA.

When doing pl.DataFrame validation it will perform both schema- and data-level validations.

@cosmicBboy cosmicBboy changed the title Feature/1528 Feature/1528: Polars LazyFrames are validated at the schema-level by default Mar 19, 2024
@cosmicBboy cosmicBboy changed the title Feature/1528: Polars LazyFrames are validated at the schema-level by default Polars LazyFrames are validated at the schema-level by default Mar 22, 2024
@cosmicBboy cosmicBboy merged commit d95c068 into main Mar 24, 2024
@cosmicBboy cosmicBboy deleted the feature/1528 branch March 24, 2024 02:02
max-raphael pushed a commit to max-raphael/pandera that referenced this pull request Jan 24, 2025
…ai-oss#1534)

* implement different validation behavior for LazyFrame/DataFrame

Signed-off-by: cosmicBboy <[email protected]>

* use config context in pandas, pyspark, polars backend

Signed-off-by: cosmicBboy <[email protected]>

* fix pydantic version-dependent object copying

Signed-off-by: cosmicBboy <[email protected]>

* LazyFrame coercion does not collect

Signed-off-by: cosmicBboy <[email protected]>

* add sphinx-design to docs requirements

Signed-off-by: cosmicBboy <[email protected]>

* add docs, clean up tests

Signed-off-by: cosmicBboy <[email protected]>

* fix polars validation config tests

Signed-off-by: cosmicBboy <[email protected]>

---------

Signed-off-by: cosmicBboy <[email protected]>
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.

Polars LazyFrame validation only does schema checks, DataFrame validation does full validation

2 participants