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 2021/02/11 04:40:13 UTC
[GitHub] [spark] amandeep-sharma commented on a change in pull request #31545: [SPARK-34417] org.apache.spark.sql.DataFrameNaFunctions.fillMap(values: Seq[(String, Any)]) fails for column name having a dot
amandeep-sharma commented on a change in pull request #31545:
URL: https://github.com/apache/spark/pull/31545#discussion_r574247925
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameNaFunctions.scala
##########
@@ -395,22 +395,24 @@ final class DataFrameNaFunctions private[sql](df: DataFrame) {
private def fillMap(values: Seq[(String, Any)]): DataFrame = {
// Error handling
+ var resolved: Map[String, Any] = Map()
values.foreach { case (colName, replaceValue) =>
// Check column name exists
- df.resolve(colName)
+ val resolvedColumn = df.resolve(colName)
// Check data type
replaceValue match {
case _: jl.Double | _: jl.Float | _: jl.Integer | _: jl.Long | _: jl.Boolean | _: String =>
- // This is good
+ // This is good
Review comment:
Thanks for catching, I shall fix it and also add comments for using additional map.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org