Skip to content

Commit d02f108

Browse files
committed
Address all comments
1 parent 255daac commit d02f108

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,20 +1705,20 @@ object SQLConf {
17051705
.doc("Enable two-level aggregate hash map. When enabled, records will first be " +
17061706
"inserted/looked-up at a 1st-level, small, fast map, and then fallback to a " +
17071707
"2nd-level, larger, slower map when 1st level is full or keys cannot be found. " +
1708-
"When disabled, records go directly to the 2nd level. Enable for partial aggregate only.")
1708+
"When disabled, records go directly to the 2nd level.")
17091709
.version("2.3.0")
17101710
.booleanConf
17111711
.createWithDefault(true)
17121712

1713-
val ENABLE_TWOLEVEL_FINAL_AGG_MAP =
1714-
buildConf("spark.sql.codegen.aggregate.final.map.twolevel.enabled")
1713+
val ENABLE_TWOLEVEL_AGG_MAP_PARTIAL_ONLY =
1714+
buildConf("spark.sql.codegen.aggregate.map.twolevel.partialOnly")
17151715
.internal()
1716-
.doc("Enable two-level aggregate hash map for final aggregate as well. Disable by default " +
1716+
.doc("Enable two-level aggregate hash map for partial aggregate only, " +
17171717
"because final aggregate might get more distinct keys compared to partial aggregate. " +
17181718
"Overhead of looking up 1st-level map might dominate when having a lot of distinct keys.")
1719-
.version("3.2.0")
1719+
.version("3.2.1")
17201720
.booleanConf
1721-
.createWithDefault(false)
1721+
.createWithDefault(true)
17221722

17231723
val ENABLE_VECTORIZED_HASH_MAP =
17241724
buildConf("spark.sql.codegen.aggregate.map.vectorized.enable")
@@ -3875,7 +3875,7 @@ class SQLConf extends Serializable with Logging {
38753875

38763876
def enableTwoLevelAggMap: Boolean = getConf(ENABLE_TWOLEVEL_AGG_MAP)
38773877

3878-
def enableTwoLevelFinalAggMap: Boolean = getConf(ENABLE_TWOLEVEL_FINAL_AGG_MAP)
3878+
def enableTwoLevelAggMapPartialOnly: Boolean = getConf(ENABLE_TWOLEVEL_AGG_MAP_PARTIAL_ONLY)
38793879

38803880
def enableVectorizedHashMap: Boolean = getConf(ENABLE_VECTORIZED_HASH_MAP)
38813881

sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate/HashAggregateExec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ case class HashAggregateExec(
671671
if (modes.forall(mode => mode == Partial || mode == PartialMerge)) {
672672
true
673673
} else {
674-
conf.enableTwoLevelFinalAggMap
674+
!conf.enableTwoLevelAggMapPartialOnly
675675
}
676676

677677
isSupported && isNotByteArrayDecimalType && isEnabledForAggModes

0 commit comments

Comments
 (0)