Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/16954#discussion_r103854544
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
---
@@ -297,8 +284,11 @@ trait CheckAnalysis extends PredicateHelper {
s"Correlated scalar sub-queries can only be used in a
Filter/Aggregate/Project: $p")
}
- case p if
p.expressions.exists(PredicateSubquery.hasPredicateSubquery) =>
- failAnalysis(s"Predicate sub-queries can only be used in a
Filter: $p")
+ case p if
p.expressions.exists(SubqueryExpression.hasInOrExistsSubquery) =>
+ p match {
+ case _: Filter => // Ok
+ case other => failAnalysis(s"Predicate sub-queries can only
be used in a Filter: $p")
--- End diff --
`case _ => failAnalysis(`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]