Skip to content

Commit 32d216f

Browse files
committed
reynolds comments
1 parent c122cca commit 32d216f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,8 @@ abstract class CodeGenerator[InType <: AnyRef, OutType <: AnyRef] extends Loggin
539539
protected def hashSetForType(dt: DataType) = dt match {
540540
case IntegerType => typeOf[IntegerHashSet]
541541
case LongType => typeOf[LongHashSet]
542+
case unsupportedType =>
543+
sys.error(s"Code generation not support for hashset of type $unsupportedType")
542544
}
543545

544546
protected def primitiveForType(dt: DataType) = dt match {

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlSerializer.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ package org.apache.spark.sql.execution
1919

2020
import java.nio.ByteBuffer
2121

22-
import org.apache.spark.sql.catalyst.expressions.GenericRow
23-
import org.apache.spark.util.collection.OpenHashSet
24-
2522
import scala.reflect.ClassTag
2623

2724
import com.clearspring.analytics.stream.cardinality.HyperLogLog
@@ -31,6 +28,8 @@ import com.twitter.chill.{AllScalaRegistrar, ResourcePool}
3128

3229
import org.apache.spark.{SparkEnv, SparkConf}
3330
import org.apache.spark.serializer.{SerializerInstance, KryoSerializer}
31+
import org.apache.spark.sql.catalyst.expressions.GenericRow
32+
import org.apache.spark.util.collection.OpenHashSet
3433
import org.apache.spark.util.MutablePair
3534
import org.apache.spark.util.Utils
3635

@@ -47,7 +46,7 @@ private[sql] class SparkSqlSerializer(conf: SparkConf) extends KryoSerializer(co
4746
new HyperLogLogSerializer)
4847
kryo.register(classOf[scala.math.BigDecimal], new BigDecimalSerializer)
4948

50-
// Specific hashsets must come first
49+
// Specific hashsets must come first TODO: Move to core.
5150
kryo.register(classOf[IntegerHashSet], new IntegerHashSetSerializer)
5251
kryo.register(classOf[LongHashSet], new LongHashSetSerializer)
5352
kryo.register(classOf[org.apache.spark.util.collection.OpenHashSet[_]],

0 commit comments

Comments
 (0)