forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix](nereids) unnest in-subquery with agg node in proper condition (a…
…pache#25800) consider sql having in-subquery SELECT count(*) FROM sub_query_correlated_subquery6 WHERE k1 IN (SELECT k1 FROM (**SELECT k1, sum(k3) AS bbb, count(k2) AS aaa FROM sub_query_correlated_subquery7 WHERE k1 > 0 AND k3 > 0 GROUP BY k1** ) y WHERE y.aaa>0 AND k1>1); The subquery part having agg is un-correlated, which can be unnested. on the other side: SELECT count(*) FROM sub_query_correlated_subquery6 WHERE k1 IN (SELECT k1 FROM (**SELECT k1, sum(k3) AS bbb, count(k2) AS aaa FROM sub_query_correlated_subquery7 WHERE k1 > 0 AND k3 > 0 and sub_query_correlated_subquery6.k1 > 2 GROUP BY k1** ) y WHERE y.aaa>0 AND k1>1); The subquery part having agg is correlated, which can't be unnested.
- Loading branch information
1 parent
16644ef
commit f138aaa
Showing
5 changed files
with
181 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters