spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [spark] johnhany97 commented on a change in pull request #26738: [SPARK-30082][SQL] Do not replace Zeros when replacing NaNs
Date Wed, 01 Jan 2020 17:52:06 GMT
johnhany97 commented on a change in pull request #26738: [SPARK-30082][SQL] Do not replace
Zeros when replacing NaNs
URL: https://github.com/apache/spark/pull/26738#discussion_r362335250
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameNaFunctions.scala
 ##########
 @@ -456,7 +456,7 @@ final class DataFrameNaFunctions private[sql](df: DataFrame) {
     val keyExpr = df.col(col.name).expr
     def buildExpr(v: Any) = Cast(Literal(v), keyExpr.dataType)
     val branches = replacementMap.flatMap { case (source, target) =>
-      Seq(buildExpr(source), buildExpr(target))
+      Seq(Literal(source), buildExpr(target))
 
 Review comment:
   Nice catch there @gatorsmile. I've updated the PR description. Should I also update the
PR title? Let me know if you'd like me to add in more details into the PR description.

----------------------------------------------------------------
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


Mime
View raw message