You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/21 05:58:19 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #24655: [SPARK-27786] Fix Sha1, Md5, and Base64 codegen when commons-codec is shaded

cloud-fan commented on a change in pull request #24655: [SPARK-27786] Fix Sha1, Md5, and Base64 codegen when commons-codec is shaded
URL: https://github.com/apache/spark/pull/24655#discussion_r285861100
 
 

 ##########
 File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/hash.scala
 ##########
 @@ -63,7 +63,7 @@ case class Md5(child: Expression) extends UnaryExpression with ImplicitCastInput
 
   override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
     defineCodeGen(ctx, ev, c =>
-      s"UTF8String.fromString(org.apache.commons.codec.digest.DigestUtils.md5Hex($c))")
+      s"UTF8String.fromString(${classOf[DigestUtils].getName}.md5Hex($c))")
 
 Review comment:
   in general we should always use `classOf` instead of hardcoding the class name, +1

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org