SPARK-27986 only supports Filter expression without DISTINCT.
We need to support Filter expression allow simultaneous use of DISTINCT
select ten, sum(distinct four) filter (where four > 10) from onek group by ten;
[Github] Pull Request #29051 (beliefer)
[Github] Pull Request #29135 (beliefer)
[Github] Pull Request #29291 (beliefer)
GitHub Pull Request #27058
GitHub Pull Request #27428