This is an automated email from the ASF dual-hosted git repository.
airborne pushed a commit to branch branch-2.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.1 by this push:
new e175c63d416 [Fix](inverted index) Fix wrong need read data opt when
enable_common_expr_pushdown is disabled #40689 (#41101)
e175c63d416 is described below
commit e175c63d416cc28d9d9f6df3c08bbe948dfc82fe
Author: airborne12 <[email protected]>
AuthorDate: Mon Sep 23 14:21:30 2024 +0800
[Fix](inverted index) Fix wrong need read data opt when
enable_common_expr_pushdown is disabled #40689 (#41101)
cherry pick from #40689
---
.../data/inverted_index_p0/test_need_read_data.out | 6 ++++++
.../inverted_index_p0/test_need_read_data.groovy | 25 ++++++++++++++++++++++
2 files changed, 31 insertions(+)
diff --git a/regression-test/data/inverted_index_p0/test_need_read_data.out
b/regression-test/data/inverted_index_p0/test_need_read_data.out
index 7298254f838..782d5e5ab0b 100644
--- a/regression-test/data/inverted_index_p0/test_need_read_data.out
+++ b/regression-test/data/inverted_index_p0/test_need_read_data.out
@@ -25,3 +25,9 @@
-- !sql4 --
2024-06-17T15:16:49 tengxun2
+-- !sql --
+1
+
+-- !sql --
+1
+
diff --git
a/regression-test/suites/inverted_index_p0/test_need_read_data.groovy
b/regression-test/suites/inverted_index_p0/test_need_read_data.groovy
index 321c95fe32f..2e8294d4cfd 100644
--- a/regression-test/suites/inverted_index_p0/test_need_read_data.groovy
+++ b/regression-test/suites/inverted_index_p0/test_need_read_data.groovy
@@ -112,4 +112,29 @@ suite("test_need_read_data", "p0"){
qt_sql2 """ select * from ${indexTbName2} WHERE a >= '2024-06-15
00:00:00' AND b = 'tengxun2' and `b` match 'tengxun2' ; """
qt_sql3 """ select COUNT(1) from ${indexTbName2} WHERE a >=
'2024-06-15 00:00:00' AND b like '%tengxun%' and `b` match
'tengxun2' ; """
qt_sql4 """ select * from ${indexTbName2} WHERE a >= '2024-06-15
00:00:00' AND b like '%tengxun%' and `b` match 'tengxun2' ; """
+
+ def indexTblName3 = "test_need_read_data_3"
+
+ sql "DROP TABLE IF EXISTS ${indexTblName3}"
+ // create 1 replica table
+ sql """
+ CREATE TABLE IF NOT EXISTS ${indexTblName3}(
+ `id` int(11) NOT NULL,
+ `value` int(11) NULL,
+ INDEX c_value_idx(`value`) USING INVERTED COMMENT ''
+ ) ENGINE=OLAP
+ DUPLICATE KEY(`id`)
+ COMMENT 'OLAP'
+ DISTRIBUTED BY HASH(`id`) BUCKETS 1
+ PROPERTIES(
+ "replication_allocation" = "tag.location.default: 1"
+ );
+ """
+
+ def var_result = sql "show variables"
+ logger.info("show variales result: " + var_result )
+
+ sql "INSERT INTO ${indexTblName3} VALUES (1, 1),(1, -2),(1, -1);"
+ qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=false) */ id FROM
${indexTblName3} WHERE value<0 and abs(value)>1;"
+ qt_sql "SELECT /*+SET_VAR(enable_common_expr_pushdown=true) */ id FROM
${indexTblName3} WHERE value<0 and abs(value)>1;"
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]