starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[BugFix] fix ngram bloom filter's bug

Open before-Sunrise opened this issue 1 year ago • 2 comments

Why I'm doing:

ngram bloom filter's logic can affect normal bloom filter index, if only create normal bloom filter index, and query “select xxx from table where cola like xxx”, it will always return empty set. can see sqltest case for details

so in this pr, rename the existed bloom filter index to original_bloom_filter to distinguish from ngram bloom filter. If one function's logic is shared by original_bloom_filter and ngram_bloom_filter, it will be called as "bloom_filter".

For example: BloomFilterIndexWriter has two implementation: 1.OridinaryBloomFilterIndexWriterImpl 2.NgramBloomFilterIndexWriterImpl. They have different logic when writing data into BloomFilter.

What I'm doing:

Fixes #issue

What type of PR is this:

  • [x] BugFix
  • [ ] Feature
  • [ ] Enhancement
  • [ ] Refactor
  • [ ] UT
  • [ ] Doc
  • [ ] Tool

Does this PR entail a change in behavior?

  • [ ] Yes, this PR will result in a change in behavior.
  • [x] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • [ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • [ ] Parameter changes: default values, similar parameters but with different default values
  • [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
  • [ ] Feature removed
  • [ ] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • [x] I have added test cases for my bug fix or my new feature
  • [ ] This pr needs user documentation (for new or modified features or behaviors)
  • [ ] I have added documentation for my new feature or new function
  • [ ] This is a backport pr

Bugfix cherry-pick branch check:

  • [x] I have checked the version labels which the pr will be auto-backported to the target branch
    • [ ] 3.2
    • [ ] 3.1
    • [ ] 3.0
    • [ ] 2.5

before-Sunrise avatar Mar 28 '24 07:03 before-Sunrise

[FE Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)

github-actions[bot] avatar May 06 '24 08:05 github-actions[bot]

[BE Incremental Coverage Report]

:white_check_mark: pass : 38 / 47 (80.85%)

file detail

path covered_line new_line coverage not_covered_line_detail
:large_blue_circle: be/src/storage/column_operator_predicate.h 0 2 00.00% [166, 168]
:large_blue_circle: be/src/storage/column_in_predicate.cpp 2 4 50.00% [131, 133]
:large_blue_circle: be/src/storage/column_predicate.h 1 2 50.00% [167]
:large_blue_circle: be/src/storage/column_expr_predicate.h 1 2 50.00% [97]
:large_blue_circle: be/src/storage/rowset/bloom_filter_index_writer.cpp 4 6 66.67% [190, 196]
:large_blue_circle: be/src/storage/column_predicate_cmp.cpp 4 5 80.00% [605]
:large_blue_circle: be/src/storage/rowset/scalar_column_iterator.cpp 9 9 100.00% []
:large_blue_circle: be/src/storage/rowset/column_reader.h 4 4 100.00% []
:large_blue_circle: be/src/storage/column_null_predicate.cpp 2 2 100.00% []
:large_blue_circle: be/src/storage/rowset/column_reader.cpp 11 11 100.00% []

github-actions[bot] avatar May 06 '24 08:05 github-actions[bot]

@Mergify backport branch-3.3

before-Sunrise avatar May 06 '24 12:05 before-Sunrise

backport branch-3.3

✅ Backports have been created

mergify[bot] avatar May 06 '24 12:05 mergify[bot]