Skip to content

Commit e43a2f1

Browse files
committed
Updates AddJar according to conventions introduced in apache#2215
1 parent b99107f commit e43a2f1

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveStrategies.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ private[hive] trait HiveStrategies {
195195

196196
case class HiveCommandStrategy(context: HiveContext) extends Strategy {
197197
def apply(plan: LogicalPlan): Seq[SparkPlan] = plan match {
198-
case logical.NativeCommand(sql) =>
199-
NativeCommand(sql, plan.output)(context) :: Nil
198+
case logical.NativeCommand(sql) => NativeCommand(sql, plan.output)(context) :: Nil
200199

201200
case hive.DropTable(tableName, ifExists) => execution.DropTable(tableName, ifExists) :: Nil
202201

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,13 @@ case class DropTable(tableName: String, ifExists: Boolean) extends LeafNode with
6666
*/
6767
@DeveloperApi
6868
case class AddJar(path: String) extends LeafNode with Command {
69-
7069
def hiveContext = sqlContext.asInstanceOf[HiveContext]
7170

7271
override def output = Seq.empty
7372

74-
override protected[sql] lazy val sideEffectResult: Seq[Any] = {
73+
override protected[sql] lazy val sideEffectResult: Seq[Row] = {
7574
hiveContext.runSqlHive(s"ADD JAR $path")
7675
hiveContext.sparkContext.addJar(path)
77-
Seq.empty[Any]
78-
}
79-
80-
override def execute(): RDD[Row] = {
81-
sideEffectResult
82-
hiveContext.emptyResult
76+
Seq.empty[Row]
8377
}
8478
}

0 commit comments

Comments
 (0)