GitHub user ggevay opened a pull request: https://github.com/apache/flink/pull/910
[FLINK-2148] [contrib] Exact and approximate countDistinct on streams For the approximate calculation I used the HyperLogLog implementation in the Clearspring library. Currently it operates only on the entire stream, but when the dust settles around the windowing rewrite, I will modify this code to work on windows instead. The Clearspring implementation has a merge method, which means that it is compatible with windowing aggregation optimizations like panes or B-Int. I have also added a fromArray convenience method to StreamExecutionEnvironment. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ggevay/flink countDistinct Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/910.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #910 ---- commit f0ae6a06daec7a016f756f9db436b2e1e56a3c46 Author: Gabor Gevay <gga...@gmail.com> Date: 2015-07-13T19:59:10Z [FLINK-2148] [contrib] Exact and approximate countDistinct on streams ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---