Skip to content

Commit 7f916b5

Browse files
committed
update execution/basicOperators on master branch
[SPARK-2234][SQL]Spark SQL basicOperators add Except operator #1151
1 parent a28dece commit 7f916b5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,16 @@ case class ExistingRdd(output: Seq[Attribute], rdd: RDD[Row]) extends LeafNode {
204204
override def execute() = rdd
205205
}
206206

207+
/**
208+
* :: DeveloperApi ::
209+
* This operator support the substract function .
210+
* Return an table with the elements from `left` that are not in `right`.
211+
*/
212+
@DeveloperApi
213+
case class Subtract(left: SparkPlan, right: SparkPlan) extends BinaryNode {
214+
override def output = left.output
215+
216+
override def execute() = {
217+
left.execute().map(_.copy()).subtract(right.execute().map(_.copy()))
218+
}
219+
}

0 commit comments

Comments
 (0)