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

[BUGFIX] Batch Expectations correctly handle date min and max values #10613

Merged
merged 5 commits into from
Nov 1, 2024

Conversation

joshua-stauffer
Copy link
Member

  • Description of PR changes above includes a link to an existing GitHub issue
  • PR title is prefixed with one of: [BUGFIX], [FEATURE], [DOCS], [MAINTENANCE], [CONTRIB]
  • Code is linted - run invoke lint (uses ruff format + ruff check)
  • Appropriate tests and docs have been updated

For more information about contributing, visit our community resources.

After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!

Copy link

netlify bot commented Nov 1, 2024

Deploy Preview for niobium-lead-7998 canceled.

Name Link
🔨 Latest commit b7b9278
🔍 Latest deploy log https://app.netlify.com/sites/niobium-lead-7998/deploys/67252f03a683650008a6b8a2

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 80.31%. Comparing base (0c2ca5d) to head (b7b9278).
Report is 2 commits behind head on develop.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
great_expectations/compatibility/sqlalchemy.py 50.00% 2 Missing ⚠️
great_expectations/expectations/expectation.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #10613      +/-   ##
===========================================
- Coverage    80.31%   80.31%   -0.01%     
===========================================
  Files          463      463              
  Lines        40077    40087      +10     
===========================================
+ Hits         32189    32195       +6     
- Misses        7888     7892       +4     
Flag Coverage Δ
3.10 68.01% <40.00%> (-0.01%) ⬇️
3.11 68.01% <40.00%> (-0.01%) ⬇️
3.12 68.01% <40.00%> (-0.01%) ⬇️
3.12 athena or openpyxl or pyarrow or project or sqlite or aws_creds 55.42% <30.00%> (-0.01%) ⬇️
3.12 aws_deps 46.16% <20.00%> (-0.01%) ⬇️
3.12 big 54.76% <20.00%> (-0.01%) ⬇️
3.12 databricks 47.89% <20.00%> (-0.01%) ⬇️
3.12 filesystem 61.73% <60.00%> (-0.01%) ⬇️
3.12 mssql 50.27% <40.00%> (-0.01%) ⬇️
3.12 mysql 50.33% <40.00%> (-0.01%) ⬇️
3.12 postgresql 54.61% <60.00%> (+<0.01%) ⬆️
3.12 snowflake 48.81% <60.00%> (+<0.01%) ⬆️
3.12 spark 58.07% <40.00%> (-0.01%) ⬇️
3.12 spark_connect 46.45% <20.00%> (-0.01%) ⬇️
3.12 trino 52.69% <40.00%> (-0.01%) ⬇️
3.9 68.05% <40.00%> (+<0.01%) ⬆️
3.9 athena or openpyxl or pyarrow or project or sqlite or aws_creds 55.42% <30.00%> (-0.01%) ⬇️
3.9 aws_deps 46.18% <20.00%> (-0.01%) ⬇️
3.9 big 54.78% <20.00%> (-0.01%) ⬇️
3.9 clickhouse 43.04% <20.00%> (-0.01%) ⬇️
3.9 databricks 47.90% <20.00%> (-0.01%) ⬇️
3.9 filesystem 61.74% <60.00%> (-0.01%) ⬇️
3.9 mssql 50.25% <40.00%> (-0.01%) ⬇️
3.9 mysql 50.31% <40.00%> (-0.01%) ⬇️
3.9 postgresql 54.60% <60.00%> (+<0.01%) ⬆️
3.9 snowflake 48.82% <60.00%> (+<0.01%) ⬆️
3.9 spark 58.04% <40.00%> (-0.01%) ⬇️
3.9 spark_connect 46.46% <20.00%> (-0.01%) ⬇️
3.9 trino 52.67% <40.00%> (-0.01%) ⬇️
cloud 0.00% <0.00%> (ø)
docs-basic 53.34% <30.00%> (-0.01%) ⬇️
docs-creds-needed 52.91% <30.00%> (-0.01%) ⬇️
docs-spark 52.42% <30.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

import pandas as pd
import sqlalchemy.dialects.postgresql as POSTGRESQL_TYPES
Copy link
Member Author

Choose a reason for hiding this comment

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

we shouldn't import directly from sqlalchemy

Copy link
Contributor

Choose a reason for hiding this comment

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

Note to non-Josh folks: the postgresql types were just imported from the sqla types, so they are equivalent. Which explains mypy being fine with this change.

import pandas as pd
import sqlalchemy.dialects.postgresql as POSTGRESQL_TYPES
Copy link
Contributor

Choose a reason for hiding this comment

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

Note to non-Josh folks: the postgresql types were just imported from the sqla types, so they are equivalent. Which explains mypy being fine with this change.

@tyler-hoffman
Copy link
Contributor

Why'd this break now (or I'm assuming as of v1?)

@joshua-stauffer
Copy link
Member Author

it seems like this broke because V1 now deserializes the min_value and max_value fields on BatchExpectations as datetime.date rather than datetime.datetime, if they are a date rather than a timestamp.

@joshua-stauffer joshua-stauffer added this pull request to the merge queue Nov 1, 2024
Merged via the queue into develop with commit ffc5ab9 Nov 1, 2024
71 checks passed
@joshua-stauffer joshua-stauffer deleted the b/core-583/expectations_fail_to_render branch November 1, 2024 20:50
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