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/13 10:12:29 UTC

[GitHub] [spark] amandeep-sharma commented on a change in pull request #31545: [SQL] [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_r575649132



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameNaFunctions.scala
##########
@@ -406,11 +408,18 @@ final class DataFrameNaFunctions private[sql](df: DataFrame) {
         case _ => throw new IllegalArgumentException(
           s"Unsupported value type ${replaceValue.getClass.getName} ($replaceValue).")
       }
+      resolved += (resolvedColumn.name -> replaceValue)
+      // Use resolved column name onwards for filling the null values.
+      // It is needed for the column names having a dot and quoted with back-tick.
+      // Eg: "`ColWith.Dot`" will be resolved to the column with name "ColWith.Dot"
+      // in a dataframe having columns ("ColWith.Dot", "Col").
+      // If resolved name is not used, while filling null values "`ColWith.Dot`" will
+      // not match "ColWith.Dot".

Review comment:
       @viirya  Moved comments ahead of the statement.




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