Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/22375#discussion_r218085246
--- 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 --
Here is summary.
* `Map(3 -> 7, 6 -> null)` passes in codegen off and fails in codegen on
with this fix
* `Map(3 -> 7, 6 -> -1)` fails in codegen off and fails in codegen on
Would it be possible to share examples of two cases that you think we would
be able to distinguish?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]