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

    https://github.com/apache/spark/pull/21537#discussion_r194958976
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala
 ---
    @@ -579,6 +579,22 @@ class CodegenContext {
         s"${fullName}_$id"
       }
     
    +  /**
    +   * Creates an `ExprValue` representing a local java variable of required 
data type.
    +   */
    +  def freshName(name: String, dt: DataType): VariableValue = 
JavaCode.variable(freshName(name), dt)
    +
    +  /**
    +   * Creates an `ExprValue` representing a local java variable of required 
data type.
    +   */
    +  def freshName(name: String, javaClass: Class[_]): VariableValue =
    +    JavaCode.variable(freshName(name), javaClass)
    +
    +  /**
    +   * Creates an `ExprValue` representing a local boolean java variable.
    +   */
    +  def isNullFreshName(name: String): VariableValue = 
JavaCode.isNullVariable(freshName(name))
    --- End diff --
    
    hmm, don't we want to do this in this PR? I can change it to 
`freshName(name, BooleanType)` together with the changes for other comments.


---

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

Reply via email to