[Chore](planner) add error information for OnClause contain ExistsPredicates (#18090)
This commit is contained in:
@ -136,6 +136,11 @@ public class FromClause implements ParseNode, Iterable<TableRef> {
|
||||
}
|
||||
tblRef.analyze(analyzer);
|
||||
leftTblRef = tblRef;
|
||||
Expr clause = tblRef.getOnClause();
|
||||
if (clause != null && clause.contains(Subquery.class)) {
|
||||
throw new AnalysisException("Not support OnClause contain Subquery, expr:"
|
||||
+ clause.toSql());
|
||||
}
|
||||
}
|
||||
// Fix the problem of column nullable attribute error caused by inline view + outer join
|
||||
changeTblRefToNullable(analyzer);
|
||||
|
||||
@ -1106,7 +1106,10 @@ suite("test_join", "query,p0") {
|
||||
qt_join_on_predicate6"""select count(a.k1) from baseall a join test b on a.k1 < 10 and a.k1 = b.k1"""
|
||||
qt_join_on_predicate7"""SELECT t2.k1,t2.k2,t3.k1,t3.k2 FROM baseall t2 LEFT JOIN test t3 ON t2.k2=t3.k2 WHERE t2.k1 = 4 OR (t2.k1 > 4 AND t3.k1 IS NULL) order by 1, 2, 3, 4"""
|
||||
|
||||
|
||||
test {
|
||||
sql "select a.k1 from baseall a join test b on b.k2 in (select 49) and a.k1 = b.k1 order by k1;"
|
||||
exception "Not support OnClause contain Subquery"
|
||||
}
|
||||
|
||||
// <=> test cases
|
||||
qt_join41"""select 1 <=> 2, 1 <=> 1, "a"= \"a\""""
|
||||
|
||||
Reference in New Issue
Block a user