diff --git a/backends-velox/src/main/scala/io/glutenproject/backendsapi/velox/SparkPlanExecApiImpl.scala b/backends-velox/src/main/scala/io/glutenproject/backendsapi/velox/SparkPlanExecApiImpl.scala index bcfd11f60ace..e7d2b22255f7 100644 --- a/backends-velox/src/main/scala/io/glutenproject/backendsapi/velox/SparkPlanExecApiImpl.scala +++ b/backends-velox/src/main/scala/io/glutenproject/backendsapi/velox/SparkPlanExecApiImpl.scala @@ -133,7 +133,10 @@ class SparkPlanExecApiImpl extends SparkPlanExecApi { override def genUuidTransformer( substraitExprName: String, original: Uuid): ExpressionTransformer = { - UuidTransformer(substraitExprName, original) + GenericExpressionTransformer( + substraitExprName, + Seq(LiteralTransformer(Literal(original.randomSeed.get))), + original) } /** Transform map_entries to Substrait. */ diff --git a/gluten-core/src/main/scala/io/glutenproject/expression/UnaryExpressionTransformer.scala b/gluten-core/src/main/scala/io/glutenproject/expression/UnaryExpressionTransformer.scala index aa4431672ad1..1e82b9c82ba4 100644 --- a/gluten-core/src/main/scala/io/glutenproject/expression/UnaryExpressionTransformer.scala +++ b/gluten-core/src/main/scala/io/glutenproject/expression/UnaryExpressionTransformer.scala @@ -240,18 +240,3 @@ case class GetArrayStructFieldsTransformer( ExpressionBuilder.makeScalarFunction(functionId, inputNodes, typeNode) } } - -case class UuidTransformer(substraitExprName: String, original: Uuid) - extends ExpressionTransformer { - - override def doTransform(args: java.lang.Object): ExpressionNode = { - val functionMap = args.asInstanceOf[java.util.HashMap[String, java.lang.Long]] - val functionId = ExpressionBuilder.newScalarFunction( - functionMap, - ConverterUtils.makeFuncName(substraitExprName, Seq(LongType))) - val seed = Literal(original.randomSeed.get) - val inputNodes = Lists.newArrayList[ExpressionNode](LiteralTransformer(seed).doTransform(args)) - val typeNode = ConverterUtils.getTypeNode(original.dataType, original.nullable) - ExpressionBuilder.makeScalarFunction(functionId, inputNodes, typeNode) - } -}