airborne12 commented on code in PR #69700:
URL: https://github.com/apache/doris/pull/69700#discussion_r4395794263
##########
be/src/olap/rowset/segment_v2/inverted_index/util/union_term_iterator.h:
##########
@@ -142,10 +142,9 @@ class UnionTermIterator {
int32_t doc_freq() const { return _cost; }
- int32_t norm() const {
- throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
- "UnionTermIterator does not support scoring");
- }
+ // The norm belongs to the document, so the sub-iterator positioned on it
reports the same one
+ // as any other.
+ int32_t norm() const { return _docs_queue->top()->norm(); }
Review Comment:
Fixed in 4343918d7f: the test now asserts that `norm()` returns the norm (1
for the mock) instead of expecting an exception. Thank you, the test was missed.
The same edit of the same test on branch-4.1 (52df5f3620) passes, together
with 1364 inverted index related unit tests there. branch-4.0 itself was not
built locally: its thirdparty needs thrift 0.16.0 and only newer sets are
installed on this machine, so thrift_util.cpp does not compile. Please rely on
CI for this branch.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]