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

Implement ds_theta_sketch() and ds_theta_estimate() functions

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • Impala 4.0.0
    • Backend, Frontend
    • None

    Description

      These should be built-in functions that use DataSketches functionality that was integrated by IMPALA-10440.

      ds_theta_sketch() should receive a primitive expression and return a sketch.ds_theta_estimate() should receive a sketch and return a primitive that is the cardinality estimate for that set of data provided to the sketch.

      Usage:

      select ds_theta_estimate(ds_theta_sketch(col_name)) from table_name;Returns a cardinality estimate for that particular column.

      Hive change that introduced the same: https://issues.apache.org/jira/browse/HIVE-22940

      https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/DataSketchesFunctions.java

       

      Attachments

        Activity

          People

            chufucun Fucun Chu
            chufucun Fucun Chu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: