A Quick and Exact Method for Distributed Quantile Computation

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Cao, Ivan, Saloni, Jaromir J., Harrison, David A. G.
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914610551980032
author Cao, Ivan
Saloni, Jaromir J.
Harrison, David A. G.
author_facet Cao, Ivan
Saloni, Jaromir J.
Harrison, David A. G.
contents Quantile computation is a core primitive in large-scale data analytics. In Spark, practitioners typically rely on the Greenwald-Khanna (GK) Sketch, an approximate method. When exact quantiles are required, the default option is an expensive global sort. We present GK Select, an exact Spark algorithm that avoids full-data shuffles and completes in a constant number of actions. GK Select leverages GK Sketch to identify a near-target pivot, extracts all values within the error bound around this pivot in each partition in linear time, and then tree-reduces the resulting candidate sets. We show analytically that GK Select matches the executor-side time complexity of GK Sketch while returning the exact quantile. Empirically, GK Select achieves sketch-level latency and outperforms Spark's full sort by approximately 10.5x on 10^9 values across 120 partitions on a 30-core AWS EMR cluster.
format Preprint
id arxiv_https___arxiv_org_abs_2511_12025
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle A Quick and Exact Method for Distributed Quantile Computation
Cao, Ivan
Saloni, Jaromir J.
Harrison, David A. G.
Distributed, Parallel, and Cluster Computing
Quantile computation is a core primitive in large-scale data analytics. In Spark, practitioners typically rely on the Greenwald-Khanna (GK) Sketch, an approximate method. When exact quantiles are required, the default option is an expensive global sort. We present GK Select, an exact Spark algorithm that avoids full-data shuffles and completes in a constant number of actions. GK Select leverages GK Sketch to identify a near-target pivot, extracts all values within the error bound around this pivot in each partition in linear time, and then tree-reduces the resulting candidate sets. We show analytically that GK Select matches the executor-side time complexity of GK Sketch while returning the exact quantile. Empirically, GK Select achieves sketch-level latency and outperforms Spark's full sort by approximately 10.5x on 10^9 values across 120 partitions on a 30-core AWS EMR cluster.
title A Quick and Exact Method for Distributed Quantile Computation
topic Distributed, Parallel, and Cluster Computing
url https://arxiv.org/abs/2511.12025