You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Fucun Chu (Jira)" <ji...@apache.org> on 2020/10/24 02:29:00 UTC

[jira] [Created] (IMPALA-10282) Implement ds_cpc_sketch() and ds_cpc_estimate() functions

Fucun Chu created IMPALA-10282:
----------------------------------

             Summary: Implement ds_cpc_sketch() and ds_cpc_estimate() functions	
                 Key: IMPALA-10282
                 URL: https://issues.apache.org/jira/browse/IMPALA-10282
             Project: IMPALA
          Issue Type: New Feature
          Components: Backend, Frontend
            Reporter: Fucun Chu
            Assignee: Fucun Chu


These should be built-in functions that use DataSketches functionality that was integrated by [IMPALA-1027|https://issues.apache.org/jira/browse/IMPALA-10279].

ds_cpc_sketch() should receive a primitive expression and return a sketch in string type (or binary once that work is submitted).
ds_cpc_estimate() should receive a sketch and return an estimate of unique count from a given CpcSketch.

Usage:
  select ds_cpc_estimate(ds_cpc_sketch(col_name)) from table_name;

Hive change that introduced the same:

 https://issues.apache.org/jira/browse/HIVE-22940

Some further examples found here:
[http://datasketches.apache.org/docs/CPC/CpcCppExample.html]

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)