Skip to content

Commit cc66198

Browse files
committed
Fix test failure
1 parent bb7c38c commit cc66198

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/BooleanSimplificationSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,14 +221,14 @@ class BooleanSimplificationSuite extends PlanTest with ExpressionEvalHelper with
221221

222222
test("Complementation Laws - null handling") {
223223
checkCondition('e && !'e,
224-
testRelationWithData.where(If('e.isNull, Literal.create(null, BooleanType), false)).analyze)
224+
testRelationWithData.where(And(Literal(null, BooleanType), 'e.isNull)).analyze)
225225
checkCondition(!'e && 'e,
226-
testRelationWithData.where(If('e.isNull, Literal.create(null, BooleanType), false)).analyze)
226+
testRelationWithData.where(And(Literal(null, BooleanType), 'e.isNull)).analyze)
227227

228228
checkCondition('e || !'e,
229-
testRelationWithData.where(If('e.isNull, Literal.create(null, BooleanType), true)).analyze)
229+
testRelationWithData.where(Or('e.isNotNull, Literal(null, BooleanType))).analyze)
230230
checkCondition(!'e || 'e,
231-
testRelationWithData.where(If('e.isNull, Literal.create(null, BooleanType), true)).analyze)
231+
testRelationWithData.where(Or('e.isNotNull, Literal(null, BooleanType))).analyze)
232232
}
233233

234234
test("Complementation Laws - negative case") {

0 commit comments

Comments
 (0)