dbtsai commented on a change in pull request #33930:
URL: https://github.com/apache/spark/pull/33930#discussion_r706561411
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
##########
@@ -290,6 +290,21 @@ object OptimizeIn extends Rule[LogicalPlan] {
* 4. Removes `Not` operator.
*/
object BooleanSimplification extends Rule[LogicalPlan] with PredicateHelper {
+ // Given argument x, return true if expression Not(x) can be simplified
+ // E.g. when x == Not(y), Not(x) == Not(Not(y)) == y
Review comment:
Nit, maybe it's easier to read,
` // E.g. let x == Not(y), then canSimplifyNot(x) == true because Not(x) ==
Not(Not(y)) == y`
--
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]