Skip to content

Commit

Permalink
Spark: Fix bucketed transform expression (#2138)
Browse files Browse the repository at this point in the history
  • Loading branch information
aokolnychyi authored Jan 22, 2021
1 parent c6b9698 commit 524bf90
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ case class IcebergBucketTransform(numBuckets: Int, child: Expression) extends Ic
@transient lazy val bucketFunc: Any => Int = child.dataType match {
case _: DecimalType =>
val t = Transforms.bucket[Any](icebergInputType, numBuckets)
d: Any => t(d.asInstanceOf[Decimal].toBigDecimal).toInt
d: Any => t(d.asInstanceOf[Decimal].toJavaBigDecimal).toInt
case _: StringType =>
// the spec requires that the hash of a string is equal to the hash of its UTF-8 encoded bytes
// TODO: pass bytes without the copy out of the InternalRow
Expand Down

0 comments on commit 524bf90

Please sign in to comment.