Skip to content

Commit

Permalink
Use LogicalPlan instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Jun 10, 2017
1 parent fe9d98b commit c4ad4c5
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -482,17 +482,15 @@ case class Sort(

/** Factory for constructing new `Range` nodes. */
object Range {
def apply(start: Long, end: Long, step: Long, numSlices: Option[Int])
: LeafNode with MultiInstanceRelation = {
def apply(start: Long, end: Long, step: Long, numSlices: Option[Int]): LogicalPlan = {
val output = StructType(StructField("id", LongType, nullable = false) :: Nil).toAttributes
if (start == end || (start < end ^ 0 < step)) {
LocalRelation(output)
} else {
new Range(start, end, step, numSlices, output)
}
}
def apply(start: Long, end: Long, step: Long, numSlices: Int)
: LeafNode with MultiInstanceRelation = {
def apply(start: Long, end: Long, step: Long, numSlices: Int): LogicalPlan = {
Range(start, end, step, Some(numSlices))
}
}
Expand Down

0 comments on commit c4ad4c5

Please sign in to comment.