Skip to content

Commit c2067e8

Browse files
Mark SQLContext transient and put it in a second param list.
The second part follows the current pattern of the rest of Spark SQL codebase.
1 parent 2ea8cdc commit c2067e8

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/SparkStrategies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ private[sql] abstract class SparkStrategies extends QueryPlanner[SparkPlan] {
221221
case class SetCommandStrategy(context: SQLContext) extends Strategy {
222222
def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
223223
case logical.SetCommand(key, value) =>
224-
Seq(execution.SetCommandPhysical(key, value, context))
224+
Seq(execution.SetCommandPhysical(key, value)(context))
225225
case _ => Nil
226226
}
227227
}

sql/core/src/main/scala/org/apache/spark/sql/execution/commands.scala

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ import org.apache.spark.sql.catalyst.expressions.{GenericRow, Attribute}
2626
* :: DeveloperApi ::
2727
*/
2828
@DeveloperApi
29-
case class SetCommandPhysical(
30-
key: Option[String],
31-
value: Option[String],
32-
context: SQLContext)
33-
extends LeafNode {
34-
29+
case class SetCommandPhysical(key: Option[String], value: Option[String])
30+
(@transient context: SQLContext) extends LeafNode {
3531
def execute(): RDD[Row] = (key, value) match {
3632
case (Some(k), Some(v)) => context.emptyResult
3733
case (Some(k), None) =>

0 commit comments

Comments
 (0)