Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Dec 6, 2023

Which issue does this PR close?

Follow on to #8433

Rationale for this change

The bloom filter tests have substantial duplication which makes it hard to see what they are trying to test. This PR refactors out the common pattern making the tests clearer to understand

What changes are included in this PR?

Refactor BoomFilter tests

Are these changes tested?

All tests

Are there any user-facing changes?

@alamb alamb changed the title Alamb/less test copy pasta2 Minor: refactor bloom filter tests to reduce duplication Dec 6, 2023
@github-actions github-actions bot added the core Core DataFusion crate label Dec 6, 2023
@alamb alamb force-pushed the alamb/less_test_copy_pasta2 branch from 3913a35 to 01198eb Compare December 18, 2023 21:39
@alamb alamb force-pushed the alamb/less_test_copy_pasta2 branch from b582b4d to 08a274a Compare December 18, 2023 21:43
@alamb alamb marked this pull request as ready for review December 18, 2023 22:03
assert!(pruned_row_groups.is_empty());
BloomFilterTest::new_data_index_bloom_encoding_stats()
.with_expect_all_pruned()
// generate pruning predicate `(String = "Hello_Not_exists" OR String = "Hello_Not_exists2")`
Copy link
Contributor

Choose a reason for hiding this comment

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

A bit controversial due to "1" = "1" part in actual test case expression.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree -- I am not sure what the "1" = "1" is all about. @haohuaijin or @waynexia do you remember?

Copy link
Contributor

@korowa korowa left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @alamb!

@alamb
Copy link
Contributor Author

alamb commented Jan 1, 2024

@waynexia or @yahoNanJing could I perhaps request your review of this PR? I can not merge it without another committer's review:

Screenshot 2024-01-01 at 8 29 52 AM

Copy link
Member

@Ted-Jiang Ted-Jiang left a comment

Choose a reason for hiding this comment

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

👍

@alamb
Copy link
Contributor Author

alamb commented Jan 2, 2024

Thank you @Ted-Jiang 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants