Skip to content

Conversation

@pepijnve
Copy link
Contributor

Which issue does this PR close?

  • None, simply corrects two unit tests

Rationale for this change

The test_and_null_boolean_intervals and test_or_null_boolean_intervals are a bit misleading. They try to create a 'null' interval using Interval::try_new(ScalarValue::Boolean(None), ScalarValue::Boolean(None)). The implementation of try_new normalises this to Interval::UNCERTAIN, which is not the same as 'null'.

What changes are included in this PR?

Adds tests demonstrating:

  • Interval::try_new(ScalarValue::Boolean(None), ScalarValue::Boolean(None)) == Interval::UNCERTAIN
  • Interval::UNCERTAIN contains ScalarValue::Boolean(Some(true)) and ScalarValue::Boolean(Some(false))
  • Interval::UNCERTAIN does not contain ScalarValue::Boolean(None) or ScalarValue::Null

Renames test_and_null_boolean_intervals and test_and_null_boolean_intervals

Are these changes tested?

Test only changes

Are there any user-facing changes?

No

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Nov 11, 2025
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @pepijnve

@alamb alamb added this pull request to the merge queue Nov 11, 2025
Merged via the queue into apache:main with commit a3a5ca4 Nov 11, 2025
32 checks passed
@alamb alamb added the development-process Related to development process of DataFusion label Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion logical-expr Logical plan and expressions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants