github-actions[bot] commented on code in PR #68051:
URL: https://github.com/apache/doris/pull/68051#discussion_r4034652764
##########
be/src/exprs/function/function_ip.h:
##########
@@ -717,7 +719,14 @@ class FunctionIsIPAddressInRange : public IFunction {
min_param.query_value = min_ip;
min_param.num_rows = num_rows;
min_param.roaring = std::make_shared<roaring::Roaring>();
+ if (has_null) {
+ // Fetch the NULL bitmap together with the first range query to
reuse its index reader.
+ min_param.null_bitmap_cache_handle = &null_bitmap_cache_handle;
Review Comment:
**[P2] Reuse the SNII BKD searcher for the NULL co-fetch**
This removes the extra open for the CLucene BKD reader, but an SNII-format
IPv4/IPv6 index selects `SniiBkdIndexReader`, which inherits the base
`query_with_null_bitmap()`. With `enable_inverted_index_searcher_cache = false`
and a cold NULL cache, its `query()` opens an uncached `BkdSearcher` and
destroys it on return; the following virtual `read_null_bitmap()` calls
`_get_searcher()` and opens the same SNII index again. This is distinct from
the earlier CLucene-specific thread because that path now populates the NULL
cache while its directory is open. Please override or refactor the SNII BKD
co-fetch so the range and NULL section share one searcher lifetime, and cover
the cache-disabled path with an open-count oracle.
--
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]