viirya 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_r240592731
##########
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:
As stated on the JIRA ticket, the problem is deep query plan. I think we can
have many ways to create such deep query plan, not only for `withColumns`. For
example, you can call `select` many times to do that too. This change makes
`withColumns` a special case.
----------------------------------------------------------------
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]