Github user mgaido91 commented on a diff in the pull request: https://github.com/apache/spark/pull/22375#discussion_r218362156 --- 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 -- Well, actually I was not clear about this, sorry for that. I meant we can separate from: - a failure caused by a wrong result returned; - a failure caused by a wrong result type returned (ie. the expected values contains NULL while the expression return data type is not nullable - this case can happen both in case the UT is bad and in case the return type of the expression is wrong);
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org