aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDavies Liu <davies@databricks.com>2015-12-13 22:57:01 -0800
committerYin Huai <yhuai@databricks.com>2015-12-13 22:57:01 -0800
commit834e71489bf560302f9d743dff669df1134e9b74 (patch)
tree82da4c3367d9b80ba34a7bda70657f2fe4f6834a /examples
parent2aecda284e22ec608992b6221e2f5ffbd51fcd24 (diff)
downloadspark-834e71489bf560302f9d743dff669df1134e9b74.tar.gz
spark-834e71489bf560302f9d743dff669df1134e9b74.tar.bz2
spark-834e71489bf560302f9d743dff669df1134e9b74.zip
[SPARK-12213][SQL] use multiple partitions for single distinct query
Currently, we could generate different plans for query with single distinct (depends on spark.sql.specializeSingleDistinctAggPlanning), one works better on low cardinality columns, the other works better for high cardinality column (default one). This PR change to generate a single plan (three aggregations and two exchanges), which work better in both cases, then we could safely remove the flag `spark.sql.specializeSingleDistinctAggPlanning` (introduced in 1.6). For a query like `SELECT COUNT(DISTINCT a) FROM table` will be ``` AGG-4 (count distinct) Shuffle to a single reducer Partial-AGG-3 (count distinct, no grouping) Partial-AGG-2 (grouping on a) Shuffle by a Partial-AGG-1 (grouping on a) ``` This PR also includes large refactor for aggregation (reduce 500+ lines of code) cc yhuai nongli marmbrus Author: Davies Liu <davies@databricks.com> Closes #10228 from davies/single_distinct.
Diffstat (limited to 'examples')
0 files changed, 0 insertions, 0 deletions