Is your feature request related to a problem or challenge? Please describe what you are trying to do.
#5354 add a rule to replace distinct with aggregate, but some subqueries are skipped, like:
- where-in subquery.
- where-exists subquery.
- scalar subquery.
- ... (not sure if there is other operator)
We need support these subqueries for the rule.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.