tanelk commented on a change in pull request #29810: URL: https://github.com/apache/spark/pull/29810#discussion_r491480708
########## File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/UnwrapCastInBinaryComparisonSuite.scala ########## @@ -120,10 +120,10 @@ class UnwrapCastInBinaryComparisonSuite extends PlanTest with ExpressionEvalHelp } test("unwrap cast should skip when expression is non-deterministic or foldable") { - Seq(positiveInt, negativeInt).foreach (v => { - val e = Cast(First(f, ignoreNulls = true), IntegerType) <=> v + Seq(positiveLong, negativeLong).foreach (v => { + val e = Cast(SparkPartitionID(), LongType) <=> v assertEquivalent(e, e, evaluate = false) - val e2 = Cast(Literal(30.toShort), IntegerType) >= v + val e2 = Cast(Literal(30), LongType) >= v assertEquivalent(e2, e2, evaluate = false) Review comment: There was no other non-deterministic expression, that can return a short, so I had to change this test a bit. ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org