Skip to content

Conversation

@alfredzimmer
Copy link

Changes

This PR addds float support to is_in_range and is_not_in_range validation functions.

Linked issues

Resolves #937

Tests

  • manually tested
  • added unit tests
  • added integration tests
  • added end-to-end tests
  • added performance tests

@alfredzimmer alfredzimmer requested a review from a team as a code owner December 7, 2025 15:07
@alfredzimmer alfredzimmer requested review from gergo-databricks and removed request for a team December 7, 2025 15:07
@alfredzimmer alfredzimmer marked this pull request as draft December 7, 2025 19:47
@alfredzimmer alfredzimmer marked this pull request as ready for review December 7, 2025 19:50
@mwojtyczka mwojtyczka requested a review from Copilot December 8, 2025 01:06
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds float support to the is_in_range and is_not_in_range validation functions by updating their type signatures to accept float parameters for min_limit and max_limit.

Key changes:

  • Updated type hints for is_in_range and is_not_in_range to accept float values
  • Added comprehensive test coverage for float range validation

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/databricks/labs/dqx/check_funcs.py Updated type signatures to include float support for min_limit and max_limit parameters
tests/unit/test_checks_validation.py Added unit test to validate float arguments in range functions
tests/integration/test_row_checks.py Extended integration tests with float column data and assertions
Comments suppressed due to low confidence (1)

src/databricks/labs/dqx/check_funcs.py:660

  • The docstring for max_limit incorrectly describes it as 'min limit'. It should be 'max limit to use in the condition as number, date, timestamp, column name or sql expression'.
    """Checks whether the values in the input column are outside the provided limits (inclusive of both boundaries).

    Args:
        column: column to check; can be a string column name or a column expression
        min_limit: min limit to use in the condition as number, date, timestamp, column name or sql expression
        max_limit: min limit to use in the condition as number, date, timestamp, column name or sql expression

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@ghanse ghanse left a comment

Choose a reason for hiding this comment

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

Looks good overall. Would you like to add float support for is_not_greater_than and is_not_less_than as well?

@alfredzimmer
Copy link
Author

Yes of course.

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.

[FEATURE]: Add float support to is_in_range function

3 participants