You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Wenchen Fan (Jira)" <ji...@apache.org> on 2021/03/09 11:48:00 UTC
[jira] [Resolved] (SPARK-34649)
org.apache.spark.sql.DataFrameNaFunctions.replace() fails for column name
having a dot
[ https://issues.apache.org/jira/browse/SPARK-34649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-34649.
---------------------------------
Fix Version/s: 3.2.0
Resolution: Fixed
Issue resolved by pull request 31769
[https://github.com/apache/spark/pull/31769]
> org.apache.spark.sql.DataFrameNaFunctions.replace() fails for column name having a dot
> --------------------------------------------------------------------------------------
>
> Key: SPARK-34649
> URL: https://issues.apache.org/jira/browse/SPARK-34649
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.1.0
> Reporter: Amandeep Sharma
> Assignee: Amandeep Sharma
> Priority: Major
> Fix For: 3.2.0
>
>
> Code to reproduce the issue:
> {code:java}
> import org.apache.spark.sql.SparkSession
> object ColumnNameWithDot {
> def main(args: Array[String]): Unit = {
> val spark = SparkSession.builder.appName("Simple Application")
> .config("spark.master", "local").getOrCreate()
> spark.sparkContext.setLogLevel("OFF")
> import spark.implicits._
> val df = Seq(("abc", 23), ("def", 44), ("n/a", 0)).toDF("ColWith.Dot", "Col.2")
> df.na.replace("`ColWith.Dot`", Map("n/a" -> "Unknown"))
> .show()
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org