cloud-fan commented on a change in pull request #35233:
URL: https://github.com/apache/spark/pull/35233#discussion_r810859617
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/LogicalPlan.scala
##########
@@ -185,7 +185,7 @@ trait UnaryNode extends LogicalPlan with
UnaryLike[LogicalPlan] {
allConstraints += EqualNullSafe(a.toAttribute, l)
case a @ Alias(e, _) =>
// For every alias in `projectList`, replace the reference in
constraints by its attribute.
- allConstraints ++= allConstraints.map(_ transform {
+ allConstraints ++= allConstraints.filter(_.deterministic).map(_
transform {
Review comment:
do you know how the `allConstraints` include nondeterministic
expressions at the first place? It starts with `child.constraints`, and looking
at the implementation, it should only produce deterministic expressions
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/QueryPlanConstraints.scala#L38
--
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]