spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhenhua Wang (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SPARK-18000) Aggregation function for computing endpoints for histograms
Date Fri, 04 Nov 2016 11:08:58 GMT

     [ https://issues.apache.org/jira/browse/SPARK-18000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Zhenhua Wang updated SPARK-18000:
---------------------------------
    Description: 
The MapAggregate function Computes frequency for each distinct non-null value of a column.
It returns: 1. null if the table is empty or all values of the column are null.
2. (distinct non-null value, frequency) pairs if the number of distinct non-null values is
less than or equal to the specified threshold.
3. an empty result if the number of distinct non-null values exceeds that threshold.

  was:
For a column, we will generate a equi-width or equi-height histogram, depending on if its
ndv is large than the maximum number of bins allowed in one histogram (denoted as numBins).
The agg function for a column returns bins - (distinct value, frequency) pairs of equi-width
histogram when the number of distinct values is less than or equal to numBins. Otherwise,
1) for column of string type, it returns an empty map; 2) for column of numeric type (including
DateType and TimestampType), it returns endpoints of equi-height histogram - approximate percentiles
at percentages 0.0, 1/numBins, 2/numBins, ..., (numBins-1)/numBins, 1.0.


> Aggregation function for computing endpoints for histograms
> -----------------------------------------------------------
>
>                 Key: SPARK-18000
>                 URL: https://issues.apache.org/jira/browse/SPARK-18000
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 2.1.0
>            Reporter: Zhenhua Wang
>
> The MapAggregate function Computes frequency for each distinct non-null value of a column.
> It returns: 1. null if the table is empty or all values of the column are null.
> 2. (distinct non-null value, frequency) pairs if the number of distinct non-null values
is
> less than or equal to the specified threshold.
> 3. an empty result if the number of distinct non-null values exceeds that threshold.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org


Mime
View raw message