Yep, there is no other better solutions except sorting result sets, but the important thing is how?
Firstly how to rewrite those sytaxes, e.g. `AVG(DISTINCT col)`, rewrite it to `DISTINCT col` or not? Secondly how to sort those result sets to calcuate aggregation results of distinct columns, e.g. `SUM(DISTINCT col1 + col2)` row by row for each result set. Finally, how to make users get the resultset using original column labels or indexes, not the rewrited column labels or indexes. --------------------------------- Juan Pan (Trista) Apache ShardingSphere Hongtao Gao <hanahm...@gmail.com> 于2019年1月3日周四 下午2:37写道: > Would you list some examples to share the "new ideas"? I couldn't find > other solutions besides sorting result sets. > > juan pan <panj...@apache.org> 于2019年1月2日周三 上午10:49写道: > > > Hi, all > > > > New year, new start. > > > > The code refactoring of merging the data generated by `DISTINCT` syntax > is > > also on the way. > > > > I decided to do this for i got some new ideas about this module > > implementation so as to make its implementation easier to extend in the > > next stage and clearer to understand. > > > > This work does not take up too much time, so it will be done before next > > release. > > > > --------------------------------- > > Juan Pan (Trista) > > Apache ShardingSphere > > > > > -- > Gao Hongtao > Apache SkyWalking & ShardingSphere >