Created
April 22, 2021 04:44
-
-
Save c21/5a9d7abb915147832f72c9c1a9047ff4 to your computer and use it in GitHub Desktop.
first level controlled by capacity, but not counter. second level controlled by counter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testFallbackStartsAt = Some(2, 3) | |
val bitMaxCapacity = testFallbackStartsAt match { | |
case Some(c1, _) => log2(c1) | |
case _ => sqlContext.conf.fastHashAggregateRowMaxCapacityBit | |
} | |
// 1st level hash map | |
agg_buffer = fastHashMap.findOrInsert(key); | |
if (agg_buffer == null) { | |
// generated. code for key in unsafe row format | |
... | |
if (counter < 3) { | |
// 2nd level hash map | |
agg_buffer = regularHashMap.getAggregationBufferFromUnsafeRow(key_in_unsafe_row, ...); | |
} | |
if (agg_buffer == null) { | |
// sort-based fallback | |
regularHashMap.destructAndCreateExternalSorter(); | |
... | |
counter = 0; | |
} | |
} | |
counter += 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment