imback82 commented on a change in pull request #31545:
URL: https://github.com/apache/spark/pull/31545#discussion_r574257803



##########
File path: 
sql/core/src/test/scala/org/apache/spark/sql/DataFrameNaFunctionsSuite.scala
##########
@@ -460,4 +460,12 @@ class DataFrameNaFunctionsSuite extends QueryTest with 
SharedSparkSession {
       Row(0, 0L, 0.toShort, 0.toByte, Float.NaN, Double.NaN) ::
       Row(0, 0L, 0.toShort, 0.toByte, Float.NaN, Double.NaN) :: Nil)
   }
+
+  test("SPARK-34417 - test fillMap() for column with a dot in the name") {
+    val na = "n/a"
+    checkAnswer(
+      Seq(("abc", 23L), ("def", 44L), (null, 0L)).toDF("ColWith.Dot", "Col")
+        .na.fill(Map("`ColWith.Dot`" -> na)),

Review comment:
       Can you run this test after changing it to `Map("Col" -> na)`? I see the 
following failure, which should be handled:
   ```
   sbt:spark-sql> testOnly *DataFrameNaFunctionsSuite -- -z "SPARK-34417"
   [info] - SPARK-34417 - test fillMap() for column with a dot in the name *** 
FAILED *** (2 seconds, 274 milliseconds)
   [info]   org.apache.spark.sql.AnalysisException: Cannot resolve column name 
"ColWith.Dot" among (ColWith.Dot, Col); did you mean to quote the `ColWith.Dot` 
column?
   [info]   at 
org.apache.spark.sql.Dataset.org$apache$spark$sql$Dataset$$resolveException(Dataset.scala:272)
   [info]   at 
org.apache.spark.sql.Dataset.$anonfun$resolve$1(Dataset.scala:263)
   ...
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to