Skip to content

Commit

Permalink
Fix the problematic case.
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Nov 28, 2017
1 parent 6368702 commit 8c7f749
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ abstract class Expression extends TreeNode[Expression] {
eval.inputRow = ctx.INPUT_ROW
}
if (ctx.currentVars != null) {
val boundRefs = children.flatMap(_.collect {
val boundRefs = this.collect {
case b @ BoundReference(ordinal, _, _) if ctx.currentVars(ordinal) != null => (ordinal, b)
}).toMap
}.toMap

ctx.currentVars.zipWithIndex.filter(_._1 != null).foreach { case (currentVar, idx) =>
if (boundRefs.contains(idx)) {
Expand Down

0 comments on commit 8c7f749

Please sign in to comment.