We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0402bd7 commit 8d42d03Copy full SHA for 8d42d03
sql/core/src/main/scala/org/apache/spark/sql/SchemaRDD.scala
@@ -374,6 +374,9 @@ class SchemaRDD(
374
375
override def collect(): Array[Row] = queryExecution.executedPlan.executeCollect()
376
377
+ override def take(num: Int): Array[Row] =
378
+ new SchemaRDD(sqlContext, Limit(Literal(num), logicalPlan)).collect()
379
+
380
// =======================================================================
381
// Base RDD functions that do NOT change schema
382
0 commit comments