Skip to content

Commit 48aa2e5

Browse files
committed
Refined SQLContext.emptyResult as an empty RDD[Row]
1 parent cc64f32 commit 48aa2e5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,7 @@ class SQLContext(@transient val sparkContext: SparkContext)
252252
protected[sql] val planner = new SparkPlanner
253253

254254
@transient
255-
protected[sql] lazy val emptyResult =
256-
sparkContext.parallelize(Seq(new GenericRow(Array[Any]()): Row), 1)
255+
protected[sql] lazy val emptyResult = sparkContext.parallelize(Seq.empty[Row], 1)
257256

258257
/**
259258
* Prepares a planned SparkPlan for execution by binding references to specific ordinals, and

0 commit comments

Comments
 (0)