You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2018/09/10 02:14:26 UTC

[GitHub] spark pull request #22375: [WIP][SPARK-25388][Test][SQL] Detect incorrect nu...

Github user maropu commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22375#discussion_r216183812
  
    --- 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 --
    
    Why did you remove the existing test `unsafeRow != expectedRow`?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org