Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/11190#discussion_r53545735
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala
---
@@ -88,7 +88,19 @@ abstract class Optimizer extends
RuleExecutor[LogicalPlan] {
Batch("Decimal Optimizations", FixedPoint(100),
DecimalAggregates) ::
Batch("LocalRelation", FixedPoint(100),
- ConvertToLocalRelation) :: Nil
+ ConvertToLocalRelation) ::
+ Batch("Subquery", Once,
+ Subquery) :: Nil
+ }
+
+ /**
+ * Optimize all the subqueries inside expression.
+ */
+ object Subquery extends Rule[LogicalPlan] {
+ def apply(plan: LogicalPlan): LogicalPlan = plan
transformAllExpressions {
+ case subquery: SubqueryExpression =>
+ subquery.withNewPlan(execute(subquery.query))
--- End diff --
where is execute coming from?
---
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]