Github user maropu commented on a diff in the pull request:
https://github.com/apache/spark/pull/22375#discussion_r216206924
--- Diff:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/ExpressionEvalHelper.scala
---
@@ -223,9 +223,9 @@ trait ExpressionEvalHelper extends
GeneratorDrivenPropertyChecks with PlanTestBa
}
} else {
val lit = InternalRow(expected, expected)
- val expectedRow =
- UnsafeProjection.create(Array(expression.dataType,
expression.dataType)).apply(lit)
- if (unsafeRow != expectedRow) {
+ val dtAsNullable = expression.dataType.asNullable
+ val expectedRow = UnsafeProjection.create(Array(dtAsNullable,
dtAsNullable)).apply(lit)
+ if (unsafeRow == expectedRow) {
--- End diff --
ah, ok.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]