Github user nongli commented on a diff in the pull request:
https://github.com/apache/spark/pull/11417#discussion_r54480848
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegen.scala
---
@@ -362,33 +349,20 @@ case class WholeStageCodegen(plan: CodegenSupport,
children: Seq[SparkPlan])
}
private[sql] override def resetMetrics(): Unit = {
- plan.foreach(_.resetMetrics())
+ child.foreach(_.resetMetrics())
}
- override def generateTreeString(
- depth: Int,
- lastChildren: Seq[Boolean],
- builder: StringBuilder): StringBuilder = {
- if (depth > 0) {
- lastChildren.init.foreach { isLast =>
- val prefixFragment = if (isLast) " " else ": "
- builder.append(prefixFragment)
- }
-
- val branch = if (lastChildren.last) "+- " else ":- "
- builder.append(branch)
- }
-
- builder.append(simpleString)
- builder.append("\n")
+ override def innerChildren: Seq[SparkPlan] = {
+ child :: Nil
+ }
- plan.generateTreeString(depth + 2, lastChildren :+ false :+ true,
builder)
- if (children.nonEmpty) {
- children.init.foreach(_.generateTreeString(depth + 1, lastChildren
:+ false, builder))
- children.last.generateTreeString(depth + 1, lastChildren :+ true,
builder)
- }
+ private def collectDirectInputs(plan: SparkPlan): Seq[SparkPlan] = plan
match {
--- End diff --
what does direct mean? This seems to recurse, making me think not direct.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]