Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Conversation

@vmaksimovski
Copy link
Contributor

@vmaksimovski vmaksimovski commented Aug 15, 2019

Here's the tests that check that UUID inequality filters are handled properly.

Test plan:
In CostEstimationTests, a generic inequality filter is applied just to sanity-check that the filter estimates actually reflect in the cost estimates.

In FilterSelectivityUtilsTests, a few tests are added in test_inequality_filters_on_uuid.

  • A UUID inequality between filter over a quarter of UUID-space is checked.
  • A pair of UUID inequality filters using >= and <= over a quarter of UUID-space is checked. Here, we test the fact that the >= and <= filters are independent of one another. Although this filter is equivalent to the 'between' filter above, our assumption that filters are independent of one another forces us to consider them differently.
  • A UUID inequality 'between' filter that is unsatisfiable should return a selectivity of 0.0.

Another test class is also added, IntegerIntervalTests, that make sure _create_integer_interval and intersections of intervals are handled correctly, as the code there is fairly tricky.

@vmaksimovski vmaksimovski marked this pull request as ready for review August 15, 2019 20:06
@bojanserafimov bojanserafimov merged commit 07839e9 into cost-estimation-uuid Aug 16, 2019
@bojanserafimov bojanserafimov deleted the cost-estimation-uuid-tests branch August 16, 2019 17:42
bojanserafimov pushed a commit that referenced this pull request Aug 19, 2019
* Add uuid filtering support

* Add assertion, improve docstrings

* Change error type

* Improve docstrings

* Document UUID constants

* Remove function querying parameters dict

* Address most reviewer feedback

* Address comments. Major revamp

* Delint

* Improve intersection finding for IntegerIntervals

* Change disjoint intersection handling

* Remove test modifications

* Improve documentation for intersection finding

* Slight changes

* Accidental test changes, reverting

* Address comments, improve error handling

* Improve error handling

* Improve docstring situation

* Further improve docstring situation

* Fix lingering intervals mention

* Remove optional

* Improve error handling, document it as well

* Add note for why between and equivalent pair of >=/<= filters are handled differently

* Add more helpful note

* Final few docstring changes

* Address comments

* Tests for UUID inequality filters ('>=', '>'...) (#482)

* Add tests for uuid filtering

* Delint

* Add intersection testing, change from CostEstimation tests to FilterSelectivityTests

* Delint x2

* Make tests reflect reviewer feedback

* Delint, add new test

* Nit

* Slight comment tweaks

* Remove unimportant file
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants