Github user misutoth commented on a diff in the pull request: https://github.com/apache/spark/pull/20674#discussion_r171386636 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala --- @@ -2239,6 +2239,34 @@ class Dataset[T] private[sql]( } } + /** + * Returns a new Dataset with altered column names. + * This is a no-op if schema doesn't contain existingName. + * + * @param convert conversion function from the old to the new name + * + * @group untypedrel + * @since 2.0.0 + */ + def withAllColumnsRenamed(convert: String => String): DataFrame = { + val output = queryExecution.analyzed.output + var containsRename = false --- End diff -- Thats correct. Removed that optimization and the code became much smaller.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org