diff --git a/spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpressions.scala b/spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpressions.scala index 259c9f20b000..4148b05a2ccb 100644 --- a/spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpressions.scala +++ b/spark3-extensions/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpressions.scala @@ -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