aboutsummaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorHerman van Hovell <hvanhovell@databricks.com>2017-03-14 14:02:48 +0100
committerHerman van Hovell <hvanhovell@databricks.com>2017-03-14 14:02:48 +0100
commit1c7275efa7bfaaa92719750e93a7b35cbcb48e45 (patch)
tree04bfc84b586863561854e80f1541f944a5fd8668 /sql
parenta0b92f73fed9b91883f08cced1c09724e09e1883 (diff)
downloadspark-1c7275efa7bfaaa92719750e93a7b35cbcb48e45.tar.gz
spark-1c7275efa7bfaaa92719750e93a7b35cbcb48e45.tar.bz2
spark-1c7275efa7bfaaa92719750e93a7b35cbcb48e45.zip
[SPARK-18874][SQL] Fix 2.10 build after moving the subquery rules to optimization
## What changes were proposed in this pull request? Commit https://github.com/apache/spark/commit/4ce970d71488c7de6025ef925f75b8b92a5a6a79 in accidentally broke the 2.10 build for Spark. This PR fixes this by simplifying the offending pattern match. ## How was this patch tested? Existing tests. Author: Herman van Hovell <hvanhovell@databricks.com> Closes #17288 from hvanhovell/SPARK-18874.
Diffstat (limited to 'sql')
-rw-r--r--sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala
index ad11700fa2..59db28d58a 100644
--- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala
+++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/subquery.scala
@@ -100,8 +100,8 @@ object SubExprUtils extends PredicateHelper {
*/
def hasNullAwarePredicateWithinNot(condition: Expression): Boolean = {
splitConjunctivePredicates(condition).exists {
- case _: Exists | Not(_: Exists) | In(_, Seq(_: ListQuery)) | Not(In(_, Seq(_: ListQuery))) =>
- false
+ case _: Exists | Not(_: Exists) => false
+ case In(_, Seq(_: ListQuery)) | Not(In(_, Seq(_: ListQuery))) => false
case e => e.find { x =>
x.isInstanceOf[Not] && e.find {
case In(_, Seq(_: ListQuery)) => true