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

    https://github.com/apache/spark/pull/20043#discussion_r171556576
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/ExprValue.scala
 ---
    @@ -70,13 +72,14 @@ case class GlobalValue(val value: String, val javaType: 
ExprType) extends ExprVa
       override val canDirectAccess: Boolean = true
     }
     
    -case object TrueLiteral extends LiteralValue("true", ExprType("boolean", 
true))
    -case object FalseLiteral extends LiteralValue("false", ExprType("boolean", 
true))
    +case object TrueLiteral extends LiteralValue("true", ExprType("boolean"))
    +case object FalseLiteral extends LiteralValue("false", ExprType("boolean"))
     
     // Represents the java type of an evaluation.
    -case class ExprType(val typeName: String, val isPrimitive: Boolean)
    +case class ExprType(val typeName: String) {
    +  def isPrimitive(ctx: CodegenContext): Boolean = 
ctx.isPrimitiveType(typeName)
    --- End diff --
    
    I see that @kiszk created a PR to move all the "static" methods to 
`CodeGenerator`. Using that approach here we do not need to pass `ctx` as an 
argument.


---

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

Reply via email to