This is an automated email from the ASF dual-hosted git repository.

kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 01b6ca464fb [Improvement](regression) change regression case name to 
make it more clear (#28630)
01b6ca464fb is described below

commit 01b6ca464fbaf778be50148bb5e57a882a553a1b
Author: airborne12 <airborn...@gmail.com>
AuthorDate: Tue Dec 19 17:20:21 2023 +0800

    [Improvement](regression) change regression case name to make it more clear 
(#28630)
---
 ...t => test_compound_predicate_constant_child.out} |  6 ++++++
 ...> test_compound_predicate_constant_child.groovy} | 21 +++++++++++++++++++--
 2 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/regression-test/data/query_p0/test_constant_fold.out 
b/regression-test/data/query_p0/test_compound_predicate_constant_child.out
similarity index 79%
rename from regression-test/data/query_p0/test_constant_fold.out
rename to 
regression-test/data/query_p0/test_compound_predicate_constant_child.out
index 5eca9777bc7..e12a4a22dd7 100644
--- a/regression-test/data/query_p0/test_constant_fold.out
+++ b/regression-test/data/query_p0/test_compound_predicate_constant_child.out
@@ -5,3 +5,9 @@
 -- !select --
 0
 
+-- !select --
+0
+
+-- !select --
+0
+
diff --git a/regression-test/suites/query_p0/test_constant_fold.groovy 
b/regression-test/suites/query_p0/test_compound_predicate_constant_child.groovy
similarity index 65%
rename from regression-test/suites/query_p0/test_constant_fold.groovy
rename to 
regression-test/suites/query_p0/test_compound_predicate_constant_child.groovy
index bb8026ccd37..9a406d7f744 100644
--- a/regression-test/suites/query_p0/test_constant_fold.groovy
+++ 
b/regression-test/suites/query_p0/test_compound_predicate_constant_child.groovy
@@ -15,9 +15,10 @@
 // specific language governing permissions and limitations
 // under the License.
 
-suite("test_constant_fold", "query") {
+suite("test_compound_predicate_constant_child", "query") {
     // define a sql table
-    def testTable = "test_constant_fold_fuzzy"
+    def testTable = "test_compound_predicate_constant_child"
+    sql """drop table if exists ${testTable};"""
 
     sql """
             CREATE TABLE IF NOT EXISTS ${testTable} (
@@ -49,4 +50,20 @@ suite("test_constant_fold", "query") {
                 (NOT ((1378719999)||(CASE ${testTable}.c0  WHEN 
${testTable}.c0 THEN -388844163  WHEN ${testTable}.c0 THEN 1455674610 ELSE 
671348352 END ))) AS INT) as count
                 FROM ${testTable}) as res;
               """
+
+   sql """ set enable_fold_constant_by_be=true """
+
+   qt_select """ SELECT SUM(count) FROM
+               (SELECT CAST((NOT ((1378719999)||(CASE ${testTable}.c0  WHEN 
${testTable}.c0 THEN -388844163  WHEN ${testTable}.c0 THEN 1455674610 ELSE 
671348352 END ))) IS NOT NULL AND
+               (NOT ((1378719999)||(CASE ${testTable}.c0  WHEN ${testTable}.c0 
THEN -388844163  WHEN ${testTable}.c0 THEN 1455674610 ELSE 671348352 END ))) AS 
INT) as count
+               FROM ${testTable}) as res;
+             """
+
+   sql """ set enable_fold_constant_by_be=false """
+
+   qt_select """ SELECT SUM(count) FROM
+               (SELECT CAST((NOT ((1378719999)||(CASE ${testTable}.c0  WHEN 
${testTable}.c0 THEN -388844163  WHEN ${testTable}.c0 THEN 1455674610 ELSE 
671348352 END ))) IS NOT NULL AND
+               (NOT ((1378719999)||(CASE ${testTable}.c0  WHEN ${testTable}.c0 
THEN -388844163  WHEN ${testTable}.c0 THEN 1455674610 ELSE 671348352 END ))) AS 
INT) as count
+               FROM ${testTable}) as res;
+             """
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to