mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 22:25:19 +00:00
(improvement)(chat) support sub-query in having (#237)
This commit is contained in:
@@ -133,6 +133,19 @@ public class SqlParserSelectHelper {
|
||||
}
|
||||
});
|
||||
}
|
||||
Expression having = plainSelect.getHaving();
|
||||
if (Objects.nonNull(having)) {
|
||||
having.accept(new ExpressionVisitorAdapter() {
|
||||
@Override
|
||||
public void visit(SubSelect subSelect) {
|
||||
SelectBody subSelectBody = subSelect.getSelectBody();
|
||||
if (subSelectBody instanceof PlainSelect) {
|
||||
plainSelects.add((PlainSelect) subSelectBody);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
return plainSelects;
|
||||
|
||||
Reference in New Issue
Block a user