This is an automated email from the ASF dual-hosted git repository. jakevin 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 49fa9fd1c7f [fix](Nereids): add def in test (#29796) (#30685) 49fa9fd1c7f is described below commit 49fa9fd1c7fab11c8203e23c9e11d4da3c7c1658 Author: jakevin <jakevin...@gmail.com> AuthorDate: Thu Feb 1 16:01:52 2024 +0800 [fix](Nereids): add def in test (#29796) (#30685) --- .../suites/nereids_p0/expression/case_when_to_if.groovy | 10 +++++----- .../suites/nereids_p0/expression/topn_to_max.groovy | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/regression-test/suites/nereids_p0/expression/case_when_to_if.groovy b/regression-test/suites/nereids_p0/expression/case_when_to_if.groovy index 8c41b8d1c67..c83ce27c017 100644 --- a/regression-test/suites/nereids_p0/expression/case_when_to_if.groovy +++ b/regression-test/suites/nereids_p0/expression/case_when_to_if.groovy @@ -30,7 +30,7 @@ suite("test_case_when_to_if") { from test_case_when_to_if group by k2; ''' - res = sql ''' + def res = sql ''' explain rewritten plan select k2, sum(case when (k1=1) then 1 end) sum1 from test_case_when_to_if @@ -45,13 +45,13 @@ suite("test_case_when_to_if") { from test_case_when_to_if group by k2; ''' - res = sql ''' + def res1 = sql ''' explain rewritten plan select k2, sum(case when (k1=1) then 1 else null end) sum1 from test_case_when_to_if group by k2; ''' - assertTrue(res.toString().contains("if")) + assertTrue(res1.toString().contains("if")) sql ''' select k2, @@ -59,11 +59,11 @@ suite("test_case_when_to_if") { from test_case_when_to_if group by k2; ''' - res = sql ''' + def res2 = sql ''' explain rewritten plan select k2, sum(case when (k1>0) then k1 else abs(k1) end) sum1 from test_case_when_to_if group by k2; ''' - assertTrue(res.toString().contains("if")) + assertTrue(res2.toString().contains("if")) } diff --git a/regression-test/suites/nereids_p0/expression/topn_to_max.groovy b/regression-test/suites/nereids_p0/expression/topn_to_max.groovy index ae848b5a244..60c603e7ef6 100644 --- a/regression-test/suites/nereids_p0/expression/topn_to_max.groovy +++ b/regression-test/suites/nereids_p0/expression/topn_to_max.groovy @@ -41,9 +41,9 @@ suite("test_topn_to_max") { select topn(k2, 1) from test_topn_to_max; ''' - res = sql ''' - explain rewritten plan select max(k2) + def res1 = sql ''' + explain rewritten plan select topn(k2, 1) from test_topn_to_max; ''' - assertTrue(res.toString().contains("max")) + assertTrue(res1.toString().contains("max"), res1.toString() + " should contain max") } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org