This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit 1684591ffd9a26d1111b12bde6c96a9a752b1477 Author: morrySnow <101034200+morrys...@users.noreply.github.com> AuthorDate: Tue Apr 9 08:51:33 2024 +0800 [chore](test) let some case suitable for legacy planner and nereids (#33352) --- .../doris/nereids/rules/analysis/BindExpression.java | 3 ++- .../suites/account_p0/test_nereids_authentication.groovy | 14 ++++---------- .../suites/correctness_p0/test_group_having_alias.groovy | 3 +++ .../suites/inverted_index_p0/test_null_index.groovy | 5 ----- .../window_functions/test_ntile_function.groovy | 4 ++-- .../schema_change_p0/test_alter_table_replace.groovy | 2 +- 6 files changed, 12 insertions(+), 19 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java index 8c8a447e830..1d0fd3ed632 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java @@ -478,7 +478,8 @@ public class BindExpression implements AnalysisRuleFactory { conjunct = TypeCoercionUtils.castIfNotSameType(conjunct, BooleanType.INSTANCE); boundConjuncts.add(conjunct); } - checkIfOutputAliasNameDuplicatedForGroupBy(boundConjuncts.build(), child.getOutput()); + checkIfOutputAliasNameDuplicatedForGroupBy(boundConjuncts.build(), + child instanceof LogicalProject ? ((LogicalProject<?>) child).getOutputs() : child.getOutput()); return new LogicalHaving<>(boundConjuncts.build(), having.child()); } diff --git a/regression-test/suites/account_p0/test_nereids_authentication.groovy b/regression-test/suites/account_p0/test_nereids_authentication.groovy index 46d60732d6b..a3f99ae02fd 100644 --- a/regression-test/suites/account_p0/test_nereids_authentication.groovy +++ b/regression-test/suites/account_p0/test_nereids_authentication.groovy @@ -53,22 +53,16 @@ suite("test_nereids_authentication", "query") { assertEquals(result.size(), 0) connect(user=user, password='Doris_123456', url=url) { - try { + test { sql "SELECT * FROM ${tableName2}" - fail() - } catch (Exception e) { - log.info(e.getMessage()) - assertTrue(e.getMessage().contains('denied to user')) + exception "denied" } } connect(user=user, password='Doris_123456', url=url) { - try { + test { sql "SELECT * FROM ${tableName1}, ${tableName2} WHERE ${tableName1}.`key` = ${tableName2}.`key`" - fail() - } catch (Exception e) { - log.info(e.getMessage()) - assertTrue(e.getMessage().contains('denied to user')) + exception "denied" } } diff --git a/regression-test/suites/correctness_p0/test_group_having_alias.groovy b/regression-test/suites/correctness_p0/test_group_having_alias.groovy index fc5e112d1d7..43f5abf4fcb 100644 --- a/regression-test/suites/correctness_p0/test_group_having_alias.groovy +++ b/regression-test/suites/correctness_p0/test_group_having_alias.groovy @@ -72,6 +72,7 @@ """ sql """set group_by_and_having_use_alias_first=true""" + sql "set enable_nereids_planner=false" // nereids not support it qt_sql """ SELECT @@ -84,6 +85,8 @@ ORDER BY date; """ + sql "set enable_nereids_planner=default" // nereids not support bellow sql + qt_sql """ SELECT date_format(date, '%x%v') AS `date2`, diff --git a/regression-test/suites/inverted_index_p0/test_null_index.groovy b/regression-test/suites/inverted_index_p0/test_null_index.groovy index 6bbab71e940..797200ab010 100644 --- a/regression-test/suites/inverted_index_p0/test_null_index.groovy +++ b/regression-test/suites/inverted_index_p0/test_null_index.groovy @@ -48,9 +48,4 @@ suite("test_null_index", "p0"){ sql "INSERT INTO $indexTblName VALUES (1, 'a', null, [null], [1]), (2, 'b', 'b', ['b'], [2]), (3, 'c', 'c', ['c'], [3]);" qt_sql "SELECT * FROM $indexTblName WHERE str match null order by id;" qt_sql "SELECT * FROM $indexTblName WHERE str_null match null order by id;" - try { - qt_sql "SELECT * FROM $indexTblName WHERE value_int element_eq 2;" - } catch (Exception e) { - assertTrue(e.getMessage().contains("unsupported nested array of type"), e.getMessage()) - } } diff --git a/regression-test/suites/query_p0/sql_functions/window_functions/test_ntile_function.groovy b/regression-test/suites/query_p0/sql_functions/window_functions/test_ntile_function.groovy index 7a92095af29..c96c3c0e168 100644 --- a/regression-test/suites/query_p0/sql_functions/window_functions/test_ntile_function.groovy +++ b/regression-test/suites/query_p0/sql_functions/window_functions/test_ntile_function.groovy @@ -73,12 +73,12 @@ suite("test_ntile_function") { test { sql "select k1, k2, k3, ntile(0) over (partition by k1 order by k2) as ntile from ${tableName} order by k1, k2, k3 desc;" - exception "Parameter n in ntile(n) should be positive." + exception "positive" } test { sql "select k1, k2, k3, ntile(k1) over (partition by k1 order by k2) as ntile from ${tableName} order by k1, k2, k3 desc;" - exception "Parameter n in ntile(n) should be constant positive integer." + exception "positive" } } diff --git a/regression-test/suites/schema_change_p0/test_alter_table_replace.groovy b/regression-test/suites/schema_change_p0/test_alter_table_replace.groovy index e261725c439..a8ef27b26c5 100644 --- a/regression-test/suites/schema_change_p0/test_alter_table_replace.groovy +++ b/regression-test/suites/schema_change_p0/test_alter_table_replace.groovy @@ -96,7 +96,7 @@ suite("test_alter_table_replace") { test { sql """ select * from ${tbNameB} order by user_id""" // check exception message contains - exception "'${tbNameB}'" + exception "${tbNameB}" } sql "DROP TABLE IF EXISTS ${tbNameA} FORCE;" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org