dongjoon-hyun commented on a change in pull request #23285: [SPARK-26224][SQL]
Warn and advice the user when creating many project on subsequent calls to
withColumn
URL: https://github.com/apache/spark/pull/23285#discussion_r242286873
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/Dataset.scala
##########
@@ -2154,6 +2155,18 @@ class Dataset[T] private[sql](
colNames,
"in given column names",
sparkSession.sessionState.conf.caseSensitiveAnalysis)
+ var numProjects = 0
+ var currPlan = logicalPlan
+ while (currPlan.isInstanceOf[Project] && numProjects < 50) {
Review comment:
Yep. If we need to warn, +1 for adding new configuration for this value
instead of `50` here and line 2164.
`50` looks effective to detect this pattern, but can we have a higher value
which is more practically related to the warning messages(performance
degradation or OOM?)?
----------------------------------------------------------------
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]