Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20043#discussion_r158328435
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
 ---
    @@ -118,10 +118,10 @@ abstract class Expression extends 
TreeNode[Expression] {
       private def reduceCodeSize(ctx: CodegenContext, eval: ExprCode): Unit = {
         // TODO: support whole stage codegen too
         if (eval.code.trim.length > 1024 && ctx.INPUT_ROW != null && 
ctx.currentVars == null) {
    -      val setIsNull = if (eval.isNull != "false" && eval.isNull != "true") 
{
    +      val setIsNull = if ("false" != s"${eval.isNull}" && "true" != 
s"${eval.isNull}") {
    --- End diff --
    
    this can be simplified to `!eval.isNull.instanceOf[LiteralValue]`


---

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

Reply via email to