From reviews-return-1001451-archive-asf-public=cust-asf.ponee.io@spark.apache.org Wed Jan 1 17:52:07 2020 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 12A5F180630 for ; Wed, 1 Jan 2020 18:52:06 +0100 (CET) Received: (qmail 69989 invoked by uid 500); 1 Jan 2020 17:52:06 -0000 Mailing-List: contact reviews-help@spark.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@spark.apache.org Received: (qmail 69977 invoked by uid 99); 1 Jan 2020 17:52:06 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jan 2020 17:52:06 +0000 From: GitBox To: reviews@spark.apache.org Subject: [GitHub] [spark] johnhany97 commented on a change in pull request #26738: [SPARK-30082][SQL] Do not replace Zeros when replacing NaNs Message-ID: <157790112635.19790.5972831010578485732.gitbox@gitbox.apache.org> References: In-Reply-To: Date: Wed, 01 Jan 2020 17:52:06 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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