n-young commented on code in PR #58867:
URL: https://github.com/apache/spark/pull/58867#discussion_r4525385707
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/misc.scala:
##########
@@ -476,12 +524,15 @@ case class AesEncrypt(
aad: Expression)
extends RuntimeReplaceable with ImplicitCastInputTypes {
+ override lazy val deterministic: Boolean = AesEncryptDeterminism(children)
Review Comment:
The masked-view example does lose partition pruning with the corrected
nondeterministic classification; the migration note alone does not restore that
performance. I propose handling the new optimizer contract separately from this
property/extraction fix. It needs compositional handling of children (AES over
rand()/uuid() must retain the barrier), propagation through StaticInvoke, and
coordinated coverage of filter, limit, semi/anti-join and pruning rules.
Treating AES as deterministic would reintroduce constant folding and
expression-duplication bugs. This PR retains the conservative barrier and
documents the cost. Leaving this thread open: please confirm whether the
optimizer work must precede merging the correctness fix.
--
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]