Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-9959

Implement ds_kll_sketch() and ds_kll_quantile() functions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.0.0
    • Backend, Frontend
    • None

    Description

      1:
      STRING ds_kll_sketch(float)
      Accepts float as parameter and returns a DataSketches KLL sketch in string type (or binary once that work is submitted).

      2:
      FLOAT (or DOUBLE?) ds_kll_quantile(KLL sketch, double)
      Accepts two parameters: a KLL sketch created by ds_hll_sketch() and a double in [0, 1] to represent the quantile.
      At this point I'm not sure about the return value, it's either a float or double, it's a subject of further investigation.

      Example:

      select ds_kll_quantile(ds_kll_sketch(cast(int_col as float)), 1) from table_name;
      +------+
      | _c0  |
      +------+
      | 1.0  |
      +------+
      

      Some further examples found here:
      https://datasketches.apache.org/docs/Quantiles/QuantilesCppExample.html

      Attachments

        Activity

          People

            gaborkaszab Gabor Kaszab
            gaborkaszab Gabor Kaszab
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: