github-actions[bot] commented on code in PR #70488: URL: https://github.com/apache/doris/pull/70488#discussion_r4558229146
########## regression-test/suites/search/test_search_bkd_skip_threshold.groovy: ########## @@ -0,0 +1,84 @@ +// 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. + +// A numeric (BKD) leaf that matches more than inverted_index_skip_threshold percent of a +// segment used to return INVERTED_INDEX_BYPASS. SEARCH has no row-by-row path, so the +// query failed with "SEARCH cannot fall back to row execution". SEARCH must always use +// the index. +suite("test_search_bkd_skip_threshold", "p0") { + sql """ set enable_common_expr_pushdown = true """ + sql """ set enable_inverted_index_query_cache = true """ Review Comment: [P2] Make this regression bypass the whole-SEARCH cache while testing the leaf threshold. With `enable_inverted_index_query_cache=true`, mixed queries such as `v.n:5 AND v.p:software` are served from FunctionSearch's DSL bitmap cache on the second warmup, before `ScalarLeafCompiler::read_from_index` runs. The fixture has only 10 rows, so the first estimate may be half of one 128-point BKD leaf (5), which is exactly the 50% boundary and does not trigger the old strict `>` check. The plain `k:5` case can still catch the bug, but the Variant/mixed path this test claims to cover may pass on the pre-fix code. Disable the DSL cache for the warmup or use enough rows / a lower threshold to force a pre-fix failure for each path. -- 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]
