File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution/aggregate Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 18
18
package org .apache .spark .sql .execution .aggregate
19
19
20
20
import org .apache .spark .TaskContext
21
- import org .apache .spark .memory .TaskMemoryManager
21
+ import org .apache .spark .memory .{ SparkOutOfMemoryError , TaskMemoryManager }
22
22
import org .apache .spark .rdd .RDD
23
23
import org .apache .spark .sql .catalyst .InternalRow
24
24
import org .apache .spark .sql .catalyst .errors ._
@@ -762,6 +762,8 @@ case class HashAggregateExec(
762
762
(" true" , " true" , " " , " " )
763
763
}
764
764
765
+ val oomeClassName = classOf [SparkOutOfMemoryError ].getName
766
+
765
767
val findOrInsertRegularHashMap : String =
766
768
s """
767
769
|// generate grouping key
@@ -787,7 +789,7 @@ case class HashAggregateExec(
787
789
| $unsafeRowKeys, ${hashEval.value});
788
790
| if ( $unsafeRowBuffer == null) {
789
791
| // failed to allocate the first page
790
- | throw new OutOfMemoryError ("No enough memory for aggregation");
792
+ | throw new $oomeClassName ("No enough memory for aggregation");
791
793
| }
792
794
|}
793
795
""" .stripMargin
You can’t perform that action at this time.
0 commit comments