maropu commented on a change in pull request #29585:
URL: https://github.com/apache/spark/pull/29585#discussion_r479831862



##########
File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
##########
@@ -203,3 +203,23 @@ abstract class BinaryNode extends LogicalPlan {
 abstract class OrderPreservingUnaryNode extends UnaryNode {
   override final def outputOrdering: Seq[SortOrder] = child.outputOrdering
 }
+
+trait LogicalPlanIntegrity {
+
+  private def canGetOutputAttrs(p: LogicalPlan): Boolean = {
+    p.resolved && !p.expressions.exists { e =>
+      // Some plans cannot call `output` because their expressions have 
`Unevaluable`,
+      // e.g., `Join` having a `ExistenceJoin` type.
+      e.collectFirst { case _: Unevaluable => true }.isDefined
+    }
+  }
+
+  def hasUniqueIdsForAttributes(plan: LogicalPlan): Boolean = {

Review comment:
       Sure.




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to