This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.1 by this push:
new 129abd9f325 [fix](function) Revert incompatible IP range index
backport (#68473)
129abd9f325 is described below
commit 129abd9f325f890d4c51224366099a9333db5df8
Author: Mryange <[email protected]>
AuthorDate: Thu Sep 24 17:29:18 2026 +0800
[fix](function) Revert incompatible IP range index backport (#68473)
[fix](function) Revert incompatible IP range index backport
### What problem does this PR solve?
Issue Number: N/A
Problem Summary: The 4.1 backport of the IP range NULL bitmap fix
references `InvertedIndexParam::null_bitmap_cache_handle`, which is not
available in the 4.1 inverted-index interfaces. This causes
`function_ip.cpp` compilation to fail. Revert the incomplete backport
until its required inverted-index changes are available on 4.1.
### Release note
None
### Check List (For Author)
- Test
- No tests run. The affected object compilation was used to reproduce
the error before the revert.
- Behavior changed: No. This revert removes the incomplete backport; the
compatible NULL bitmap fix can be picked up with its dependencies later.
- Does this need documentation: No
---
be/src/exprs/function/function_ip.h | 9 ----
.../inverted_index_p0/test_ip_cidr_not_null.out | 9 ----
.../inverted_index_p0/test_ip_cidr_not_null.groovy | 63 ----------------------
3 files changed, 81 deletions(-)
diff --git a/be/src/exprs/function/function_ip.h
b/be/src/exprs/function/function_ip.h
index f17d414e955..2dba40459e6 100644
--- a/be/src/exprs/function/function_ip.h
+++ b/be/src/exprs/function/function_ip.h
@@ -708,8 +708,6 @@ public:
}
// apply for inverted index
std::shared_ptr<roaring::Roaring> null_bitmap =
std::make_shared<roaring::Roaring>();
- bool has_null = DORIS_TRY(iter->has_null());
- segment_v2::InvertedIndexQueryCacheHandle null_bitmap_cache_handle;
// >= min ip
segment_v2::InvertedIndexParam min_param;
@@ -719,14 +717,7 @@ public:
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;
- }
RETURN_IF_ERROR(iter->read_from_index(&min_param));
- if (has_null) {
- null_bitmap = null_bitmap_cache_handle.get_bitmap();
- }
// <= max ip
segment_v2::InvertedIndexParam max_param;
diff --git a/regression-test/data/inverted_index_p0/test_ip_cidr_not_null.out
b/regression-test/data/inverted_index_p0/test_ip_cidr_not_null.out
deleted file mode 100644
index 66457fb92b2..00000000000
--- a/regression-test/data/inverted_index_p0/test_ip_cidr_not_null.out
+++ /dev/null
@@ -1,9 +0,0 @@
--- This file is automatically generated. You should know what you did if you
want to edit this
--- !sql_without_inverted_index --
-3
-
--- !sql_with_inverted_index --
-3
-
--- !sql_with_inverted_index_repeat --
-3
diff --git
a/regression-test/suites/inverted_index_p0/test_ip_cidr_not_null.groovy
b/regression-test/suites/inverted_index_p0/test_ip_cidr_not_null.groovy
deleted file mode 100644
index d45186bf37f..00000000000
--- a/regression-test/suites/inverted_index_p0/test_ip_cidr_not_null.groovy
+++ /dev/null
@@ -1,63 +0,0 @@
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements. See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership. The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied. See the License for the
-// specific language governing permissions and limitations
-// under the License.
-
-suite("test_ip_cidr_not_null", "nonConcurrent") {
- sql "DROP TABLE IF EXISTS test_ip_cidr_not_null"
- sql """
- CREATE TABLE test_ip_cidr_not_null (
- id INT NOT NULL,
- address IPV4 NULL,
- INDEX address_index (address) USING INVERTED
- ) ENGINE=OLAP
- DUPLICATE KEY(id)
- DISTRIBUTED BY HASH(id) BUCKETS 1
- PROPERTIES ('replication_num' = '1')
- """
- sql """
- INSERT INTO test_ip_cidr_not_null VALUES
- (1, '192.168.1.1'),
- (2, NULL),
- (3, '192.168.2.1'),
- (4, '192.168.1.255')
- """
-
- sql "SET debug_skip_fold_constant = true"
- sql "SET inverted_index_skip_threshold = 0"
- sql "SET enable_segment_limit_pushdown = true"
-
- sql "SET enable_inverted_index_query = false"
- qt_sql_without_inverted_index """
- SELECT id
- FROM test_ip_cidr_not_null
- WHERE NOT is_ip_address_in_range(address, '192.168.1.0/24')
- ORDER BY id
- """
-
- sql "SET enable_inverted_index_query = true"
- qt_sql_with_inverted_index """
- SELECT id
- FROM test_ip_cidr_not_null
- WHERE NOT is_ip_address_in_range(address, '192.168.1.0/24')
- ORDER BY id
- """
- qt_sql_with_inverted_index_repeat """
- SELECT id
- FROM test_ip_cidr_not_null
- WHERE NOT is_ip_address_in_range(address, '192.168.1.0/24')
- ORDER BY id
- """
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]