[chore](test) let some case suitable for legacy planner and nereids (#33352)
This commit is contained in:
@ -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());
|
||||
}
|
||||
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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`,
|
||||
|
||||
@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;"
|
||||
|
||||
Reference in New Issue
Block a user