support extract the unrelated predication from the subquery
Open
sig/planner
type/enhancement
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Support rewrite the query `select * from t1 where t1.a in (select aggregation(xxx) from t2 where t1.b > 6)` to `select * from t1 where t1.b > 6 and t1.a in (select aggregation(xxx) from t2)`. By the way, in some corner cases, the rewrite is wrong. For example, if the `aggregation(xxx)` is `count(1)` which can generate the result although the input is empty.
Contributor guide
Assessment
This issue has not been assessed yet.