Skip to content

Commit

Permalink
Implement trigger() as limit() followed by collect()
Browse files Browse the repository at this point in the history
Implement trigger() as limit() followed by collect()gdfg
  • Loading branch information
sameeragarwal committed Jun 11, 2014
1 parent 0402bd7 commit 8d42d03
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@ class SchemaRDD(

override def collect(): Array[Row] = queryExecution.executedPlan.executeCollect()

override def take(num: Int): Array[Row] =
new SchemaRDD(sqlContext, Limit(Literal(num), logicalPlan)).collect()

// =======================================================================
// Base RDD functions that do NOT change schema
// =======================================================================
Expand Down

0 comments on commit 8d42d03

Please sign in to comment.