Optional Iterator refactor - [MOD-8844]#6260
Conversation
It contains the code for the Optional Iterator refactor. Implementation has been taken from https://github.com/RediSearch/RediSearch/pull/5619/files
tests/cpptests/micro-benchmarks/benchmark_optional_iterator.cpp
Outdated
Show resolved
Hide resolved
It contains the code for the Optional Iterator refactor. Implementation has been taken from https://github.com/RediSearch/RediSearch/pull/5619/files
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6260 +/- ##
==========================================
- Coverage 88.79% 88.77% -0.02%
==========================================
Files 244 246 +2
Lines 40978 41051 +73
Branches 3483 3483
==========================================
+ Hits 36385 36444 +59
- Misses 4550 4564 +14
Partials 43 43
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tests/cpptests/micro-benchmarks/benchmark_optional_iterator.cpp
Outdated
Show resolved
Hide resolved
tests/cpptests/micro-benchmarks/benchmark_optional_iterator.cpp
Outdated
Show resolved
Hide resolved
tests/cpptests/micro-benchmarks/benchmark_optional_iterator.cpp
Outdated
Show resolved
Hide resolved
tests/cpptests/micro-benchmarks/benchmark_optional_iterator.cpp
Outdated
Show resolved
Hide resolved
It contains the code for the Optional Iterator refactor. Implementation has been taken from https://github.com/RediSearch/RediSearch/pull/5619/files
|
|
||
| // Create a new OPTIONAL iterator - Non-Optimized version. | ||
| QueryIterator *IT_V2(NewOptionalIterator)(QueryIterator *it, t_docId maxDocId, size_t numDocs, double weight) { | ||
| assert(it != NULL); |
There was a problem hiding this comment.
On a second look, this may happen (for example, when searching for ~foo but no document has foo so there is no inverted index for it)
I suggest we return a wildcard iterator in this case.
We have to check the implications on FT.PROFILE and FT.EXPLAIN when we start using the new iterators
There was a problem hiding this comment.
alternativly, use RS_ASSERT and we will have to handle this case when using the API
It contains the code for the Optional Iterator refactor.
Implementation has been taken from https://github.com/RediSearch/RediSearch/pull/5619/files