aboutsummaryrefslogtreecommitdiff
path: root/sql/catalyst/src/test/scala
diff options
context:
space:
mode:
authorDongjoon Hyun <dongjoon@apache.org>2016-08-10 10:31:30 +0200
committerHerman van Hovell <hvanhovell@databricks.com>2016-08-10 10:31:30 +0200
commit41a7dbdd34d2641d42eb00828f16285089356aa9 (patch)
treecc3751488cfbd76fe6cc39a3018086dbe8c4e401 /sql/catalyst/src/test/scala
parentbdd537164dcfeec5e9c51d54791ef16997ff2597 (diff)
downloadspark-41a7dbdd34d2641d42eb00828f16285089356aa9.tar.gz
spark-41a7dbdd34d2641d42eb00828f16285089356aa9.tar.bz2
spark-41a7dbdd34d2641d42eb00828f16285089356aa9.zip
[SPARK-10601][SQL] Support `MINUS` set operator
## What changes were proposed in this pull request? This PR adds `MINUS` set operator which is equivalent `EXCEPT DISTINCT`. This will slightly improve the compatibility with Oracle. ## How was this patch tested? Pass the Jenkins with newly added testcases. Author: Dongjoon Hyun <dongjoon@apache.org> Closes #14570 from dongjoon-hyun/SPARK-10601.
Diffstat (limited to 'sql/catalyst/src/test/scala')
-rw-r--r--sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
index fbe236e196..00a37cf636 100644
--- a/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
+++ b/sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
@@ -68,6 +68,9 @@ class PlanParserSuite extends PlanTest {
assertEqual("select * from a except select * from b", a.except(b))
intercept("select * from a except all select * from b", "EXCEPT ALL is not supported.")
assertEqual("select * from a except distinct select * from b", a.except(b))
+ assertEqual("select * from a minus select * from b", a.except(b))
+ intercept("select * from a minus all select * from b", "MINUS ALL is not supported.")
+ assertEqual("select * from a minus distinct select * from b", a.except(b))
assertEqual("select * from a intersect select * from b", a.intersect(b))
intercept("select * from a intersect all select * from b", "INTERSECT ALL is not supported.")
assertEqual("select * from a intersect distinct select * from b", a.intersect(b))