File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
sql/core/src/main/scala/org/apache/spark/sql/execution Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -93,11 +93,13 @@ case class HashAggregateExec(
93
93
// This is for testing. We force TungstenAggregationIterator to fall back to the unsafe row hash
94
94
// map and/or the sort-based aggregation once it has processed a given number of input rows.
95
95
private val testFallbackStartsAt : Option [(Int , Int )] = {
96
- sqlContext.getConf(" spark.sql.TungstenAggregate.testFallbackStartsAt" , null ) match {
97
- case null | " " => None
98
- case fallbackStartsAt =>
99
- val splits = fallbackStartsAt.split(" ," ).map(_.trim)
100
- Some ((splits.head.toInt, splits.last.toInt))
96
+ Option (sqlContext).flatMap {
97
+ _.getConf(" spark.sql.TungstenAggregate.testFallbackStartsAt" , null ) match {
98
+ case null | " " => None
99
+ case fallbackStartsAt =>
100
+ val splits = fallbackStartsAt.split(" ," ).map(_.trim)
101
+ Some ((splits.head.toInt, splits.last.toInt))
102
+ }
101
103
}
102
104
}
103
105
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ case class ShuffleExchangeExec(
61
61
62
62
override def nodeName : String = " Exchange"
63
63
64
- private val serializer : Serializer =
64
+ private lazy val serializer : Serializer =
65
65
new UnsafeRowSerializer (child.output.size, longMetric(" dataSize" ))
66
66
67
67
@ transient lazy val inputRDD : RDD [InternalRow ] = child.execute()
You can’t perform that action at this time.
0 commit comments