starocean999 opened a new pull request, #37644: URL: https://github.com/apache/doris/pull/37644
sql: `select * from t1 where t1.c1 < (select max(t2.c1) from t2 where t1.c2 = abs(t2.c2));` before this pr, we would use the equivalent sql as bellow, which is wrong `select t1.* from t1 semi join ( select t2.c2 as c2, max(t2.c1) as c1 from t2 group by t2.c ) tx on t1.c1 < tx.c1 and t1.c2 = tx.c2;` the pr fix the problem and get the correct one as: `select t1.* from t1 semi join ( select abs(t2.c2) as c2, max(t2.c1) as c1 from t2 group by abs(t2.c) ) tx on t1.c1 < tx.c1 and t1.c2 = tx.c2;` ## Proposed changes Issue Number: close #xxx <!--Describe your changes.--> -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org