Skip to content

Commit

Permalink
reynolds comments
Browse files Browse the repository at this point in the history
  • Loading branch information
marmbrus committed Aug 20, 2014
1 parent c122cca commit 32d216f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,8 @@ abstract class CodeGenerator[InType <: AnyRef, OutType <: AnyRef] extends Loggin
protected def hashSetForType(dt: DataType) = dt match {
case IntegerType => typeOf[IntegerHashSet]
case LongType => typeOf[LongHashSet]
case unsupportedType =>
sys.error(s"Code generation not support for hashset of type $unsupportedType")
}

protected def primitiveForType(dt: DataType) = dt match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ package org.apache.spark.sql.execution

import java.nio.ByteBuffer

import org.apache.spark.sql.catalyst.expressions.GenericRow
import org.apache.spark.util.collection.OpenHashSet

import scala.reflect.ClassTag

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

import org.apache.spark.{SparkEnv, SparkConf}
import org.apache.spark.serializer.{SerializerInstance, KryoSerializer}
import org.apache.spark.sql.catalyst.expressions.GenericRow
import org.apache.spark.util.collection.OpenHashSet
import org.apache.spark.util.MutablePair
import org.apache.spark.util.Utils

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

// Specific hashsets must come first
// Specific hashsets must come first TODO: Move to core.
kryo.register(classOf[IntegerHashSet], new IntegerHashSetSerializer)
kryo.register(classOf[LongHashSet], new LongHashSetSerializer)
kryo.register(classOf[org.apache.spark.util.collection.OpenHashSet[_]],
Expand Down

0 comments on commit 32d216f

Please sign in to comment.