HyukjinKwon commented on a change in pull request #25628: 
[SPARK-28897][Core]'coalesce' error when executing dataframe.na.fill
URL: https://github.com/apache/spark/pull/25628#discussion_r319482514
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/DataFrameNaFunctions.scala
 ##########
 @@ -435,11 +435,10 @@ final class DataFrameNaFunctions private[sql](df: 
DataFrame) {
    * Returns a [[Column]] expression that replaces null value in `col` with 
`replacement`.
    */
   private def fillCol[T](col: StructField, replacement: T): Column = {
-    val quotedColName = "`" + col.name + "`"
 
 Review comment:
   Does `.` work too?
   
   ```scala
   scala> val df = spark.range(1).selectExpr("1 as `a.b`")
   df: org.apache.spark.sql.DataFrame = [a.b: int]
   
   scala> df.col("a.b")
   org.apache.spark.sql.AnalysisException: Cannot resolve column name "a.b" 
among (a.b);
     at org.apache.spark.sql.Dataset.$anonfun$resolve$1(Dataset.scala:259)
     at scala.Option.getOrElse(Option.scala:138)
     at org.apache.spark.sql.Dataset.resolve(Dataset.scala:259)
     at org.apache.spark.sql.Dataset.col(Dataset.scala:1340)
     ... 47 elided
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to