Skip to content

Commit

Permalink
Literal.
Browse files Browse the repository at this point in the history
  • Loading branch information
rxin committed Jan 29, 2015
1 parent 4cfeb78 commit 68b31cb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sql/core/src/main/scala/org/apache/spark/sql/DataFrame.scala
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ import org.apache.spark.storage.StorageLevel
import org.apache.spark.sql.catalyst.ScalaReflection
import org.apache.spark.sql.catalyst.analysis.UnresolvedRelation
import org.apache.spark.sql.catalyst.expressions._
import org.apache.spark.sql.catalyst.expressions.{Literal => LiteralExpr}
import org.apache.spark.sql.catalyst.plans.{JoinType, Inner}
import org.apache.spark.sql.catalyst.plans.logical._
import org.apache.spark.sql.execution.{LogicalRDD, EvaluatePython}
Expand Down Expand Up @@ -249,7 +248,7 @@ class DataFrame protected[sql](
require(projection.productArity >= 1)
select(projection.productIterator.map {
case c: Column => c
case o: Any => new Column(Some(sqlContext), None, LiteralExpr(o))
case o: Any => new Column(Some(sqlContext), None, Literal(o))
}.toSeq :_*)
}

Expand Down Expand Up @@ -394,7 +393,7 @@ class DataFrame protected[sql](
* Returns a new [[DataFrame]] by taking the first `n` rows. The difference between this function
* and `head` is that `head` returns an array while `limit` returns a new [[DataFrame]].
*/
override def limit(n: Int): DataFrame = Limit(LiteralExpr(n), logicalPlan)
override def limit(n: Int): DataFrame = Limit(Literal(n), logicalPlan)

/**
* Returns a new [[DataFrame]] containing union of rows in this frame and another frame.
Expand Down

0 comments on commit 68b31cb

Please sign in to comment.