EmmyMiao87 opened a new pull request #3150: Support non-correlated subquery in having clause URL: https://github.com/apache/incubator-doris/pull/3150 This commit support the non-correlated subquery in having clause. For example: select k1, sum(k2) from table group by k1 having sum(k2) > (select avg(k1) from table) Also the non-scalar subquery is supportted in Doris. For example: select k1, sum(k2) from table group by k1 having sum(k2) > (select avg(k1) from table group by k2) Doris will check the result row numbers of subquery in executing. If more then one row returned by subquery, the query will thrown exception. The implement method: The entire outer query is regarded as inline view of new query. The subquery in having clause is changed to the where predicate in this new query. After this commit, tpc-ds 23,24,44 are supported. This commit also support the subquery in ArithmeticExpr. For example: select k1 from table where k1=0.9*(select k1 from t);
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org