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

    https://github.com/apache/spark/pull/19813#discussion_r154581731
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala
 ---
    @@ -115,9 +120,35 @@ abstract class Expression extends TreeNode[Expression] 
{
         }
       }
     
    +  /**
    +   * Returns the input variables to this expression.
    +   */
    +  private def findInputVars(ctx: CodegenContext, eval: ExprCode): 
Seq[ExprInputVar] = {
    +    if (ctx.currentVars != null) {
    +      val boundRefs = this.collect {
    +        case b @ BoundReference(ordinal, _, _) if ctx.currentVars(ordinal) 
!= null => (ordinal, b)
    --- End diff --
    
    It is not necessarily empty. We will also record it if its `code` is not 
empty.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to