Skip to content

Commit 28d101e

Browse files
committed
adjust the test case
1 parent 08309e7 commit 28d101e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/SubexpressionEliminationSuite.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ class SubexpressionEliminationSuite extends SparkFunSuite with ExpressionEvalHel
450450
assert(e2.getCommonSubexpressions.head == add)
451451
}
452452

453-
test("SPARK-42851: Handle supportExpressions consistently across add and get") {
453+
test("SPARK-42851: Handle supportExpression consistently across add and get") {
454454
val tx = {
455455
val arr = Literal(Array(1, 2))
456456
val ArrayType(et, cn) = arr.dataType
@@ -459,9 +459,10 @@ class SubexpressionEliminationSuite extends SparkFunSuite with ExpressionEvalHel
459459
ArrayTransform(arr, lambda)
460460
}
461461
val equivalence = new EquivalentExpressions
462-
val isNewExpr = equivalence.addExpr(tx)
462+
equivalence.addExpr(tx)
463+
val hasMatching = equivalence.addExpr(tx)
463464
val cseState = equivalence.getExprState(tx)
464-
assert(isNewExpr == cseState.isDefined)
465+
assert(hasMatching == cseState.isDefined)
465466
}
466467
}
467468

0 commit comments

Comments
 (0)