HyukjinKwon commented on a change in pull request #22428: [SPARK-25430][SQL] 
Add map parameter for withColumnRenamed
URL: https://github.com/apache/spark/pull/22428#discussion_r247317731
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
 ##########
 @@ -2300,6 +2300,37 @@ class Dataset[T] private[sql](
     }
   }
 
+  /**
+   * Returns a new Dataset with columns renamed.
+   * This is a no-op if schema doesn't contain existingNames in columnMap.
+   * {{{
+   *   df.withColumnRenamed(Map(
+   *     "c1" -> "first_column",
+   *     "c2" -> "second_column"
+   *   ))
+   * }}}
+   *
+   * @group untypedrel
+   * @since 3.0.0
+   */
+  def withColumnRenamed(columnMap: Map[String, String]): DataFrame = {
 
 Review comment:
   Btw this won't support java's map.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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