[GitHub] spark pull request #22428: [SPARK-25430][SQL] Add map parameter for withColu...
Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22428#discussion_r217937566 --- Diff: 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 2.4.0 --- End diff -- branch-2.4 is cut out. We will probably target 3.0.0 if we happen to add new APIs. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #22428: [SPARK-25430][SQL] Add map parameter for withColu...
GitHub user goungoun opened a pull request: https://github.com/apache/spark/pull/22428 [SPARK-25430][SQL] Add map parameter for withColumnRenamed ## What changes were proposed in this pull request? This PR allows withColumnRenamed with a map input argument ## How was this patch tested? unit tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/goungoun/spark SPARK-25430 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/22428.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #22428 commit eb0858989952454e2112bf6247d85d33438525e0 Author: Goun Na Date: 2018-09-15T13:30:45Z [SPARK-18073][SQL] Add map parameter for withColumnRenamed --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org