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 22, 2015
1 parent 84c9807 commit dede020
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,12 @@ 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 {
((r: InternalRow) => r).asInstanceOf[Projection]
(r: InternalRow) => r
}
}

override def outputPartitioning: Partitioning = streamed.outputPartitioning

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,12 @@ trait HashJoin {

// Mutable per row objects.
private[this] val joinRow = new JoinedRow2
private[this] val resultProjection: Projection = if (supportUnsafe) {
UnsafeProjection.create(self.schema)
} else {
((r: InternalRow) => r).asInstanceOf[Projection]
}
private[this] val resultProjection: InternalRow => InternalRow =
if (supportUnsafe) {
UnsafeProjection.create(self.schema)
} else {
(r: InternalRow) => r
}

private[this] val joinKeys = streamSideKeyGenerator

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,11 @@ trait HashOuterJoin {
}
}

@transient private[this] lazy val resultProjection: Projection =
@transient private[this] lazy val resultProjection: InternalRow => InternalRow =
if (supportUnsafe) {
// Converted returned JoinRow into UnsafeRow
UnsafeProjection.create(self.schema)
} else {
((x: InternalRow) => x).asInstanceOf[Projection]
(r: InternalRow) => r
}

@transient private[this] lazy val DUMMY_LIST = CompactBuffer[InternalRow](null)
Expand Down

0 comments on commit dede020

Please sign in to comment.