avantgardnerio commented on code in PR #3287:
URL: https://github.com/apache/arrow-datafusion/pull/3287#discussion_r957672704
##########
datafusion/optimizer/src/decorrelate_scalar_subquery.rs:
##########
@@ -101,16 +101,17 @@ impl OptimizerRule for DecorrelateScalarSubquery {
let (subqueries, other_exprs) =
self.extract_subquery_exprs(predicate, optimizer_config)?;
- let optimized_plan = LogicalPlan::Filter(Filter {
- predicate: predicate.clone(),
- input: Arc::new(optimized_input),
- });
+
if subqueries.is_empty() {
// regular filter, no subquery exists clause here
+ let optimized_plan = LogicalPlan::Filter(Filter {
+ predicate: predicate.clone(),
+ input: Arc::new(optimized_input),
+ });
return Ok(optimized_plan);
}
- // iterate through all exists clauses in predicate, turning
each into a join
+ // iterate through all subqueries in predicate, turning each
into a join
Review Comment:
Thanks for fixing my messy docs and comments everywhere!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]