pan3793 commented on code in PR #58735:
URL: https://github.com/apache/spark/pull/58735#discussion_r3988412569
##########
sql/core/src/test/scala/org/apache/spark/sql/CTEInlineSuite.scala:
##########
@@ -451,6 +451,29 @@ abstract class CTEInlineSuiteBase
}
}
+ test("SPARK-59434: non-deterministic predicates are not pushed into a CTE
def") {
Review Comment:
Added, in b5fb8a0d3d2. The definition gets `Filter ((c1 > 0) OR (c1 < 2))`
and the `rand` conjunct stays at the reference; it fails on master, where the
pushed condition still carries `rand(2) < 0.5`.
Also added a sibling case: when one reference has only non-deterministic
predicates the combined predicate is TRUE, so the definition gets no filter and
the deterministic sibling's predicate is not pushed on its own. That is the
soundness invariant a "drop the non-det term" refactor would break, and it now
fails on master too.
--
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]