Skip to content

Commit

Permalink
Delete unrelated expression change
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosen committed Jul 30, 2015
1 parent 884ab95 commit 4a99204
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import java.security.{MessageDigest, NoSuchAlgorithmException}
import java.util.zip.CRC32

import org.apache.commons.codec.digest.DigestUtils
import org.apache.spark.sql.catalyst.InternalRow

import org.apache.spark.sql.catalyst.expressions.codegen._
import org.apache.spark.sql.types._
Expand Down Expand Up @@ -161,22 +160,3 @@ case class Crc32(child: Expression) extends UnaryExpression with ImplicitCastInp
})
}
}

/** An expression that returns the hashCode of the input row. */
case object RowHashCode extends LeafExpression {
override def dataType: DataType = IntegerType

/** hashCode will never be null. */
override def nullable: Boolean = false

override def eval(input: InternalRow): Any = {
input.hashCode
}

override def genCode(ctx: CodeGenContext, ev: GeneratedExpressionCode): String = {
s"""
boolean ${ev.isNull} = false;
${ctx.javaType(dataType)} ${ev.primitive} = i.hashCode();
"""
}
}

0 comments on commit 4a99204

Please sign in to comment.