You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2025/11/25 08:29:31 UTC
(doris) branch branch-4.0 updated: branch-4.0: [chore] Opt index scan cases #57951 (#58332)
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new e0035e7ebb7 branch-4.0: [chore] Opt index scan cases #57951 (#58332)
e0035e7ebb7 is described below
commit e0035e7ebb70c060c203c4f762ca739409a5a15c
Author: zhiqiang <se...@163.com>
AuthorDate: Tue Nov 25 16:29:24 2025 +0800
branch-4.0: [chore] Opt index scan cases #57951 (#58332)
cherry pick from #57951
---------
Co-authored-by: morrySnow <zh...@selectdb.com>
---
regression-test/suites/ann_index_p0/ann_index_only_scan.groovy | 6 +++---
.../suites/ann_index_p0/ann_index_only_scan_distance_expr.groovy | 5 +++--
.../suites/ann_index_p0/ann_index_only_scan_metric_direction.groovy | 5 +++--
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/regression-test/suites/ann_index_p0/ann_index_only_scan.groovy b/regression-test/suites/ann_index_p0/ann_index_only_scan.groovy
index 756070f9f5f..743db656260 100644
--- a/regression-test/suites/ann_index_p0/ann_index_only_scan.groovy
+++ b/regression-test/suites/ann_index_p0/ann_index_only_scan.groovy
@@ -44,11 +44,10 @@ suite("ann_index_only_scan") {
sql "set profile_level=2;"
sql "set enable_profile=true;"
sql "set experimental_enable_virtual_slot_for_cse=true;"
- // disable lazy materialization since it will break index-only scan.
- sql "set experimental_topn_lazy_materialization_threshold=0;"
sql "set parallel_pipeline_task_num=1;"
sql "set enable_sql_cache=false;"
+
sql """
create table ann_index_only_scan (
id int not null,
@@ -104,7 +103,8 @@ suite("ann_index_only_scan") {
def lines = profileText.split("\n")
for (def line : lines) {
if (line.contains("ScanBytes:")) {
- def m = (line =~ /ScanBytes:\s*([0-9]+(?:\.[0-9]+)?)\s*[A-Za-z]+/)
+ // allow optional unit (e.g. "B"); sometimes profile prints no unit for 0 bytes
+ def m = (line =~ /ScanBytes:\s*([0-9]+(?:\.[0-9]+)?)(?:\s*([A-Za-z]+))?/)
if (m.find()) {
return m.group(1)
}
diff --git a/regression-test/suites/ann_index_p0/ann_index_only_scan_distance_expr.groovy b/regression-test/suites/ann_index_p0/ann_index_only_scan_distance_expr.groovy
index d87ce69a45d..bf26009185e 100644
--- a/regression-test/suites/ann_index_p0/ann_index_only_scan_distance_expr.groovy
+++ b/regression-test/suites/ann_index_p0/ann_index_only_scan_distance_expr.groovy
@@ -46,7 +46,8 @@ def extractScanBytesValue = { String profileText ->
def lines = profileText.split("\n")
for (def line : lines) {
if (line.contains("ScanBytes:")) {
- def m = (line =~ /ScanBytes:\s*([0-9]+(?:\.[0-9]+)?)\s*[A-Za-z]+/)
+ // allow optional unit (e.g. "B"); sometimes profile prints no unit for 0 bytes
+ def m = (line =~ /ScanBytes:\s*([0-9]+(?:\.[0-9]+)?)(?:\s*([A-Za-z]+))?/)
if (m.find()) {
return m.group(1)
}
@@ -80,10 +81,10 @@ suite("ann_index_only_scan_distance_expr") {
sql "unset variable all;"
sql "set profile_level=2;"
sql "set enable_profile=true;"
- sql "set experimental_topn_lazy_materialization_threshold=0;"
sql "set experimental_enable_virtual_slot_for_cse=true;"
sql "set enable_no_need_read_data_opt=true;"
sql "set parallel_pipeline_task_num=1;" // make execution more deterministic for test
+
sql "drop table if exists ann_expr_l2"
sql """
diff --git a/regression-test/suites/ann_index_p0/ann_index_only_scan_metric_direction.groovy b/regression-test/suites/ann_index_p0/ann_index_only_scan_metric_direction.groovy
index 02ebd673115..757b71cd495 100644
--- a/regression-test/suites/ann_index_p0/ann_index_only_scan_metric_direction.groovy
+++ b/regression-test/suites/ann_index_p0/ann_index_only_scan_metric_direction.groovy
@@ -49,7 +49,8 @@ def extractScanBytesValue = { String profileText ->
def lines = profileText.split("\n")
for (def line : lines) {
if (line.contains("ScanBytes:")) {
- def m = (line =~ /ScanBytes:\s*([0-9]+(?:\.[0-9]+)?)\s*[A-Za-z]+/)
+ // allow optional unit (e.g. "B"); sometimes profile prints no unit for 0 bytes
+ def m = (line =~ /ScanBytes:\s*([0-9]+(?:\.[0-9]+)?)(?:\s*([A-Za-z]+))?/)
if (m.find()) {
return m.group(1)
}
@@ -83,10 +84,10 @@ suite("ann_index_only_scan_metric_direction") {
sql "unset variable all;"
sql "set profile_level=2;"
sql "set enable_profile=true;"
- sql "set experimental_topn_lazy_materialization_threshold=0;"
sql "set experimental_enable_virtual_slot_for_cse=true;"
sql "set enable_no_need_read_data_opt=true;"
sql "set parallel_pipeline_task_num=1;" // make execution more deterministic for test
+
// l2 table
sql "drop table if exists ann_md_l2"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org