diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpression.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpression.scala index c388e7691dd58..9041ed15fc501 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpression.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TransformExpression.scala @@ -117,7 +117,7 @@ case class TransformExpression( override protected def withNewChildrenInternal(newChildren: IndexedSeq[Expression]): Expression = copy(children = newChildren) - lazy val resolvedFunction: Option[Expression] = this match { + private lazy val resolvedFunction: Option[Expression] = this match { case TransformExpression(scalarFunc: ScalarFunction[_], arguments, Some(numBuckets)) => Some(V2ExpressionUtils.resolveScalarFunction(scalarFunc, Seq(Literal(numBuckets)) ++ arguments)) diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala index a4756ac1fde74..19595eef10b34 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/physical/partitioning.scala @@ -887,7 +887,7 @@ case class KeyGroupedShuffleSpec( override def createPartitioning(clustering: Seq[Expression]): Partitioning = { - val newExpressions: Seq[Expression] = clustering.zip(partitioning.expressions).map{ + val newExpressions: Seq[Expression] = clustering.zip(partitioning.expressions).map { case (c, e: TransformExpression) => TransformExpression( e.function, Seq(c), e.numBucketsOpt) case (c, _) => c