-
- Downloads
[SPARK-16524][SQL] Add RowBatch and RowBasedHashMapGenerator
## What changes were proposed in this pull request? This PR is the first 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 `RowBasedKeyValueBatch`. We then automatically pick between the two implementations based on certain knobs. In this first-step PR, implementations for `RowBasedKeyValueBatch` and `RowBasedHashMapGenerator` are added. ## How was this patch tested? Unit tests: `RowBasedKeyValueBatchSuite` Author: Qifan Pu <qifan.pu@gmail.com> Closes #14349 from ooq/SPARK-16524.
Showing
- sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/FixedLengthRowBasedKeyValueBatch.java 174 additions, 0 deletions...atalyst/expressions/FixedLengthRowBasedKeyValueBatch.java
- sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/RowBasedKeyValueBatch.java 182 additions, 0 deletions...spark/sql/catalyst/expressions/RowBasedKeyValueBatch.java
- sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/VariableLengthRowBasedKeyValueBatch.java 185 additions, 0 deletions...lyst/expressions/VariableLengthRowBasedKeyValueBatch.java
- sql/catalyst/src/test/java/org/apache/spark/sql/catalyst/expressions/RowBasedKeyValueBatchSuite.java 425 additions, 0 deletions.../sql/catalyst/expressions/RowBasedKeyValueBatchSuite.java
- sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashMapGenerator.scala 176 additions, 0 deletions...ache/spark/sql/execution/aggregate/HashMapGenerator.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/RowBasedHashMapGenerator.scala 205 additions, 0 deletions...rk/sql/execution/aggregate/RowBasedHashMapGenerator.scala
- sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/VectorizedHashMapGenerator.scala 9 additions, 126 deletions.../sql/execution/aggregate/VectorizedHashMapGenerator.scala
Loading
Please register or sign in to comment