cloud-fan commented on a change in pull request #31769:
URL: https://github.com/apache/spark/pull/31769#discussion_r589251834
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/DataFrameNaFunctions.scala
##########
@@ -327,7 +327,7 @@ final class DataFrameNaFunctions private[sql](df:
DataFrame) {
*/
def replace[T](col: String, replacement: Map[T, T]): DataFrame = {
if (col == "*") {
- replace0(df.columns, replacement)
+ replace0(df.columns.map { colName => s"`${colName}`" }, replacement)
Review comment:
it may not work if `colName` already includes backticks. I think we
should let `replace0` take `Seq[Attribute]` and here we pass in
`df.logicalPlan.output`
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]