You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2022/06/29 08:41:00 UTC

[jira] [Updated] (HIVE-26221) Add histogram-based column statistics

|  ![](cid:jira-generated-image-avatar-81a0b75c-8b45-49ea-b3e5-a41b242f6a94) |
[Alessandro
Solimando](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=asolimando)
**updated** an issue  
---|---  
|  
---  
|  [Hive](https://issues.apache.org/jira/browse/HIVE) /
[![Improvement](cid:jira-generated-image-avatar-
bfa17f10-2899-48a8-9a96-c99ee0eae878)](https://issues.apache.org/jira/browse/HIVE-26221)
[HIVE-26221](https://issues.apache.org/jira/browse/HIVE-26221)  
---  
[Add histogram-based column
statistics](https://issues.apache.org/jira/browse/HIVE-26221)  
| Change By: |  [Alessandro
Solimando](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=asolimando)  
---|---  
|  Hive does not support histogram statistics, which are particularly useful
for skewed data (which is very common in practice) and range predicates.  
  
Hive's current selectivity estimation for range predicates is based on a hard-
coded value of 1/3 (see
[FilterSelectivityEstimator.java#L138-L144|#L138-L144]).])  
  
The current proposal aims at integrating histogram as an additional column
statistics, stored into the Hive metastore at the table (or partition) level.  
  
The main requirements for histogram integration are the following:  
* efficiency: the approach must scale and support billions of rows  
* merge-ability: partition-level histograms have to be merged to form table-level histograms  
* explicit and configurable trade-off between memory footprint and accuracy  
  
Hive already integrates [KLL data
sketches|https://datasketches.apache.org/docs/KLL/KLLSketch.html] UDAF.
Datasketches are small, stateful programs that process massive data-streams
and can provide approximate answers, with mathematical guarantees, to
computationally difficult queries orders-of-magnitude faster than traditional,
exact methods.  
  
We propose to use KLL, and more specifically the cumulative distribution
function (CDF), as the underlying data structure for our histogram statistics.  
  
The current proposal only targets numeric data types (float, integer and
numeric families) , excluding string and temporal data types for the moment
(date and timestamp) .  
---  
|  |  [ ![Add Comment](cid:jira-generated-image-static-comment-icon-
cafa7769-553f-4d4f-a387-8cf85d6a9828)
](https://issues.apache.org/jira/browse/HIVE-26221#add-comment "Add Comment")
|  [Add Comment](https://issues.apache.org/jira/browse/HIVE-26221#add-comment
"Add Comment")  
---|---  
  
|  This message was sent by Atlassian Jira (v8.20.10#820010-sha1:ace47f9) |  |
![Atlassian logo](https://issues.apache.org/jira/images/mail/atlassian-email-
logo.png)  
---