distinct aggregation
https://docs.google.com/document/d/1zj6OA-K2hi7ah8Fo-xTQB-mVmYfm6LsN2_NHgTCVmJI/edit#
https://issues.apache.org/jira/browse/FLINK-5315
https://issues.apache.org/jira/browse/FLINK-8689
https://issues.apache.org/jira/browse/FLINK-8690