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

    https://github.com/apache/spark/pull/20043#discussion_r158361160
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/nullExpressions.scala
 ---
    @@ -321,7 +322,12 @@ case class IsNull(child: Expression) extends 
UnaryExpression with Predicate {
     
       override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
         val eval = child.genCode(ctx)
    -    ExprCode(code = eval.code, isNull = "false", value = eval.isNull)
    +    val value = if ("true" == s"${eval.isNull}" || "false" == 
s"${eval.isNull}") {
    --- End diff --
    
    or `eval.isNull == Literal("true")`? Or even better we can create a 
`LiteralTrue = Literal("true")` and equivalent for false and use them?


---

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

Reply via email to