cloud-fan commented on a change in pull request #32041:
URL: https://github.com/apache/spark/pull/32041#discussion_r607174623



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/Command.scala
##########
@@ -37,3 +37,9 @@ trait Command extends LogicalPlan {
 trait LeafCommand extends Command with LeafLike[LogicalPlan]
 trait UnaryCommand extends Command with UnaryLike[LogicalPlan]
 trait BinaryCommand extends Command with BinaryLike[LogicalPlan]
+
+trait CommandWithAnalyzedChildren extends Command {
+  def childrenToAnalyze: Seq[LogicalPlan] = Nil
+
+  override final def children: Seq[LogicalPlan] = 
childrenToAnalyze.filter(!_.analyzed)

Review comment:
       This is a bit risky. Some analyzer rules may want to transform the child 
even if it's analyzed.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to