[ https://issues.apache.org/jira/browse/SPARK-16651?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15386360#comment-15386360 ]
Dongjoon Hyun commented on SPARK-16651: --------------------------------------- I made a PR for you and other people, but I'm not sure it'll be merged. > No exception using DataFrame.withColumnRenamed when existing column doesn't > exist > --------------------------------------------------------------------------------- > > Key: SPARK-16651 > URL: https://issues.apache.org/jira/browse/SPARK-16651 > Project: Spark > Issue Type: Bug > Components: PySpark > Affects Versions: 1.5.0 > Reporter: Tom Phillips > > The {{withColumnRenamed}} method does not raise an exception when the > existing column does not exist in the dataframe. > Example: > {code} > In [4]: df.show() > +---+-----+ > |age| name| > +---+-----+ > | 1|Alice| > +---+-----+ > In [5]: df = df.withColumnRenamed('dob', 'date_of_birth') > In [6]: df.show() > +---+-----+ > |age| name| > +---+-----+ > | 1|Alice| > +---+-----+ > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org