viirya commented on a change in pull request #29567:
URL: https://github.com/apache/spark/pull/29567#discussion_r479792044
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/BooleanSimplificationSuite.scala
##########
@@ -221,14 +221,14 @@ class BooleanSimplificationSuite extends PlanTest with
ExpressionEvalHelper with
test("Complementation Laws - null handling") {
checkCondition('e && !'e,
- testRelationWithData.where(If('e.isNull, Literal.create(null,
BooleanType), false)).analyze)
+ testRelationWithData.where(And(Literal(null, BooleanType),
'e.isNull)).analyze)
Review comment:
Usually we only test corresponding rule in each test suite. But some
suites use multiple rules like this one. For this one, although we can still
only test `BooleanSimplification` if we add another optimizer, but seems too
much. Maybe currently it's good enough. Maybe add a comment.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]