v.22.5Performance Improvement
Allow rewriting countDistinct aggregation to subquery format
Allow to rewriteselect countDistinct(a) from ttoselect count(1) from (select a from t groupBy a). #35993 (zhanglistar).
Allow to rewriteselect countDistinct(a) from ttoselect count(1) from (select a from t groupBy a). #35993 (zhanglistar).