Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/16954#discussion_r103980267
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
---
@@ -1204,64 +1250,36 @@ class Analyzer(
// Category 1:
// BroadcastHint, Distinct, LeafNode, Repartition, and
SubqueryAlias
- case p: BroadcastHint =>
- p
- case p: Distinct =>
- p
- case p: LeafNode =>
- p
- case p: Repartition =>
- p
- case p: SubqueryAlias =>
- p
+ case _: BroadcastHint | _: Distinct | _: LeafNode | _: Repartition
| _: SubqueryAlias =>
// Category 2:
// These operators can be anywhere in a correlated subquery.
// so long as they do not host outer references in the operators.
case p: Sort =>
failOnOuterReference(p)
- p
case p: RepartitionByExpression =>
failOnOuterReference(p)
- p
// Category 3:
// Filter is one of the two operators allowed to host correlated
expressions.
// The other operator is Join. Filter can be anywhere in a
correlated subquery.
case f @ Filter(cond, child) =>
// Find all predicates with an outer reference.
- val (correlated, local) =
splitConjunctivePredicates(cond).partition(containsOuter)
+ val (correlated, local) =
+ splitConjunctivePredicates(cond).partition(containsOuter)
--- End diff --
`val (correlated, local) =
splitConjunctivePredicates(cond).partition(containsOuter)`
---
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]