Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Davies Liu committed Jul 23, 2015
1 parent 5eb1b5a commit 1c5ad8d
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,11 @@ case class BroadcastNestedLoopJoin(
override def outputsUnsafeRows: Boolean = left.outputsUnsafeRows || right.outputsUnsafeRows
override def canProcessUnsafeRows: Boolean = true

@transient private[this] lazy val resultProjection: Projection = {
@transient private[this] lazy val resultProjection: InternalRow => InternalRow = {
if (outputsUnsafeRows) {
UnsafeProjection.create(schema)
} else {
new Projection {
override def apply(r: InternalRow): InternalRow = r
}
identity[InternalRow]
}
}

Expand Down Expand Up @@ -140,7 +138,7 @@ case class BroadcastNestedLoopJoin(
joinedRow.withLeft(leftNulls)
while (i < rel.length) {
if (!allIncludedBroadcastTuples.contains(i)) {
buf += resultProjection(joinedRow.withRight(rel(i)))
buf += resultProjection(joinedRow.withRight(rel(i))).copy()
}
i += 1
}
Expand All @@ -149,7 +147,7 @@ case class BroadcastNestedLoopJoin(
joinedRow.withRight(rightNulls)
while (i < rel.length) {
if (!allIncludedBroadcastTuples.contains(i)) {
buf += resultProjection(joinedRow.withLeft(rel(i)))
buf += resultProjection(joinedRow.withLeft(rel(i))).copy()
}
i += 1
}
Expand Down

0 comments on commit 1c5ad8d

Please sign in to comment.