Skip to content

Commit

Permalink
[SPARK-34608][SQL] Remove unused output of AddJarCommand
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Remove unused output of AddJarCommand, keep consistence and clean

### Why are the changes needed?
Keep consistence and clean

### Does this PR introduce _any_ user-facing change?
No

### How was this patch tested?
Not need

Closes #31725 from AngersZhuuuu/SPARK-34608.

Authored-by: Angerszhuuuu <angers.zhu@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
  • Loading branch information
AngersZhuuuu authored and dongjoon-hyun committed Mar 5, 2021
1 parent 43aacd5 commit 979b9bc
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,12 @@ import org.apache.hadoop.fs.Path

import org.apache.spark.sql.{Row, SparkSession}
import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference}
import org.apache.spark.sql.types.{IntegerType, StringType, StructField, StructType}
import org.apache.spark.sql.types.StringType

/**
* Adds a jar to the current session so it can be used (for UDFs or serdes).
*/
case class AddJarCommand(path: String) extends RunnableCommand {
override val output: Seq[Attribute] = {
val schema = StructType(
StructField("result", IntegerType, nullable = false) :: Nil)
schema.toAttributes
}

override def run(sparkSession: SparkSession): Seq[Row] = {
sparkSession.sessionState.resourceLoader.addJar(path)
Seq.empty[Row]
Expand Down

0 comments on commit 979b9bc

Please sign in to comment.