GitHub user sunjincheng121 opened a pull request:

    https://github.com/apache/flink/pull/4652

    [FLINK-7465][table]Add cardinality count for tableAPI and SQL.

    ## What is the purpose of the change
    
    *In this PR. we want add add CARDINALITY_COUNT for tableAPI and SQL.(Using 
`HyperLogLog` algorithm). 
    The implementation of HyperLogLog (HLL) algorithm from this paper: 
http://algo.inria.fr/flajolet/Publications/FlFuGaMe07.pdf 
    As we know there are still some improved algorithms, such as: 
HyperLogLog++, HyperBitBit etc.
    But `HyperLogLog` is a classic algorithm that has been massively verified, 
so I chose to use the `HyperLogLog` algorithm as the first version of 
cardinality to achieve. And we can improve the algorithm at any time If we need.
    *
    
    ## Brief change log
      - *Add Java implementation of `HyperLogLog`(base on stream-lib)*
      - *Add MURMURHASH See more: http://murmurhash.googlepages.com/*
      - *Add build-in `CardinalityCountAggFunction`*
      - *Add some test case for the validation*
      - *Add documentation for TableAPI&SQL*
    
    ## Verifying this change
    This change added tests and can be verified as follows:
      - *Added SQL/TableAPI integration tests for `cardinality_count`*
      - *Added `CardinalityCountAggFunctionTest` test case for verify the AGG 
logic.*
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes)
      - If yes, how is the feature documented? (docs / JavaDocs)
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sunjincheng121/flink FLINK-7465-PR

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/4652.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 #4652
    
----
commit bc1166ad88538bdcdd6df685c750359aadff3950
Author: 金竹 <[email protected]>
Date:   2017-09-05T10:21:10Z

    [FLINK-7465][table]Add cardinality count for tableAPI and SQL.

----


---

Reply via email to