mgaido91 commented on a change in pull request #23285: [SPARK-26224][SQL] Avoid
creating many project on subsequent calls to withColumn
URL: https://github.com/apache/spark/pull/23285#discussion_r240605608
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -2146,7 +2146,7 @@ class Dataset[T] private[sql](
* Returns a new Dataset by adding columns or replacing the existing columns
that has
* the same names.
*/
- private[spark] def withColumns(colNames: Seq[String], cols: Seq[Column]):
DataFrame = {
+ private[spark] def withColumns(colNames: Seq[String], cols: Seq[Column]):
DataFrame = withPlan {
Review comment:
yes, but I think this is a special case. I have seen many cases when
`withColumn` is used in for loops: with this change such a pattern would be
better supported.
----------------------------------------------------------------
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]