bersprockets commented on code in PR #36230:
URL: https://github.com/apache/spark/pull/36230#discussion_r851691251
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OuterJoinEliminationSuite.scala:
##########
@@ -252,4 +254,19 @@ class OuterJoinEliminationSuite extends PlanTest {
comparePlans(optimized, originalQuery.analyze)
}
}
+
+ // evaluating if assert_true/raised in filter predicate will cause exception
+ test("SPARK-38868: assert_true/raised in filter predicate does not throw
exception") {
+ val x = testRelation.subquery(Symbol("x"))
+ val y = testRelation1.subquery(Symbol("y"))
+
+ val message = Literal(UTF8String fromString("Bad value"), StringType)
+ val originalQuery =
+ x.join(y, LeftOuter, Option("x.a".attr === "y.d".attr))
+ .where(If("y.d".attr > 0, true, RaiseError(message)).isNull)
Review Comment:
I didn't do `AssertTrue` here because `RuntimeReplaceable` doesn't evaluate,
so I just put in what `AssertTrue` gets replaced with.
--
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]