aboutsummaryrefslogtreecommitdiff
path: root/sql/hive
diff options
context:
space:
mode:
authorQifan Pu <qifan.pu@gmail.com>2016-09-01 16:56:35 -0700
committerDavies Liu <davies.liu@gmail.com>2016-09-01 16:56:35 -0700
commit03d77af9ec4ce9a42affd6ab4381ae5bd3c79a5a (patch)
tree995655dd8f46c969cf701206521ee9273b3a2430 /sql/hive
parent15539e54c2650a164f09c072f8fae934bb0468c9 (diff)
downloadspark-03d77af9ec4ce9a42affd6ab4381ae5bd3c79a5a.tar.gz
spark-03d77af9ec4ce9a42affd6ab4381ae5bd3c79a5a.tar.bz2
spark-03d77af9ec4ce9a42affd6ab4381ae5bd3c79a5a.zip
[SPARK-16525] [SQL] Enable Row Based HashMap in HashAggregateExec
## What changes were proposed in this pull request? This PR is the second step for the following feature: For hash aggregation in Spark SQL, we use a fast aggregation hashmap to act as a "cache" in order to boost aggregation performance. Previously, the hashmap is backed by a `ColumnarBatch`. This has performance issues when we have wide schema for the aggregation table (large number of key fields or value fields). In this JIRA, we support another implementation of fast hashmap, which is backed by a `RowBatch`. We then automatically pick between the two implementations based on certain knobs. In this second-step PR, we enable `RowBasedHashMapGenerator` in `HashAggregateExec`. ## How was this patch tested? Added tests: `RowBasedAggregateHashMapSuite` and ` VectorizedAggregateHashMapSuite` Additional micro-benchmarks tests and TPCDS results will be added in a separate PR in the series. Author: Qifan Pu <qifan.pu@gmail.com> Author: ooq <qifan.pu@gmail.com> Closes #14176 from ooq/rowbasedfastaggmap-pr2.
Diffstat (limited to 'sql/hive')
-rw-r--r--sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
index 2dcf13c02a..4a8086d7e5 100644
--- a/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
+++ b/sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/AggregationQuerySuite.scala
@@ -998,9 +998,9 @@ class HashAggregationQuerySuite extends AggregationQuerySuite
class HashAggregationQueryWithControlledFallbackSuite extends AggregationQuerySuite {
override protected def checkAnswer(actual: => DataFrame, expectedAnswer: Seq[Row]): Unit = {
- Seq(0, 10).foreach { maxColumnarHashMapColumns =>
- withSQLConf("spark.sql.codegen.aggregate.map.columns.max" ->
- maxColumnarHashMapColumns.toString) {
+ Seq("true", "false").foreach { enableTwoLevelMaps =>
+ withSQLConf("spark.sql.codegen.aggregate.map.twolevel.enable" ->
+ enableTwoLevelMaps) {
(1 to 3).foreach { fallbackStartsAt =>
withSQLConf("spark.sql.TungstenAggregate.testFallbackStartsAt" ->
s"${(fallbackStartsAt - 1).toString}, ${fallbackStartsAt.toString}") {