ahshahid opened a new pull request, #53658:
URL: https://github.com/apache/spark/pull/53658
Fix to simplify boolean expression of form like !(expr1 || expr2) in a
single pass, where expr1 and expr2 are binary comparison expression
### What changes were proposed in this pull request?
In the rule BooleanSimplification , the expressions are analyzed using the
tramsformUp traversal
i.e q.transformExpressionsUpWithPruning.
Instead of that proposing to traverse down. i.e
q.transformExpressionsDownWithPruning.
### Why are the changes needed?
The change is needed because in the case of tramsformUp, the idempotency is
not achieved in the optimal way ( single pass compared to double pass).
The issue arises due to rule tramsforming
Not (A || B) => (Not(A) AND Not(B))
Because the new child has added Not operations, they are not acted in that
pass due to transformUp.
With transformDown, the new children with Not, would be simplified in that
pass itself
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Added bug test
### Was this patch authored or co-authored using generative AI tooling?
No
--
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]