Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/22375#discussion_r218629945
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelperSuite.scala
---
@@ -35,6 +36,13 @@ class ExpressionEvalHelperSuite extends SparkFunSuite
with ExpressionEvalHelper
val e = intercept[RuntimeException] {
checkEvaluation(BadCodegenExpression(), 10) }
assert(e.getMessage.contains("some_variable"))
}
+
+ test("SPARK-25388: checkEvaluation should fail if nullable in DataType
is incorrect") {
+ val e = intercept[RuntimeException] {
+ checkEvaluation(MapIncorrectDataTypeExpression(), Map(3 -> 7, 6 ->
null))
--- End diff --
I meant how your proposed assert can distinguish the two cases that you
want to distinguish at
[here](https://github.com/apache/spark/pull/22375#discussion_r217495874).
1. a failure caused by a bad test, ie. a test written wrongly
2. a UT failure caused by a bug in what we are testing
As you said
[here](https://github.com/apache/spark/pull/22375#discussion_r218362156), the
assert may detect both cases 1. and 2..
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]