cloud-fan commented on code in PR #49245:
URL: https://github.com/apache/spark/pull/49245#discussion_r1908167968
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/pipeOperators.scala:
##########
@@ -57,6 +66,21 @@ case class PipeExpression(child: Expression, isAggregate:
Boolean, clause: Strin
}
}
+/**
+ * Validates and strips PipeExpression nodes from a logical plan once the
child expressions are
+ * resolved.
+ */
+object ValidateAndStripPipeExpressions extends Rule[LogicalPlan] {
+ def apply(plan: LogicalPlan): LogicalPlan =
plan.resolveOperatorsUpWithPruning(
+ _.containsPattern(PIPE_EXPRESSION), ruleId) {
+ case node: LogicalPlan =>
+ node.resolveExpressions {
+ case p: PipeExpression if p.child.resolved =>
+ p.checkInvariantsAndRemove
Review Comment:
shall we remove this lazy val and inline the validation code here?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]