-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MINOR: Improvements to scalar_subquery_to_join
error handling
#3754
Conversation
@avantgardnerio Could you review this when you get a chance |
@@ -21,7 +21,7 @@ use crate::utils::{ | |||
}; | |||
use crate::{utils, OptimizerConfig, OptimizerRule}; | |||
use datafusion_common::{context, plan_err, Column, Result}; | |||
use datafusion_expr::logical_plan::{Aggregate, Filter, JoinType, Projection, Subquery}; | |||
use datafusion_expr::logical_plan::{Filter, JoinType, Limit, Subquery}; | |||
use datafusion_expr::{combine_filters, Expr, LogicalPlan, LogicalPlanBuilder, Operator}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that if the particular subquery isn't supported by the physical operators, it will error out at that time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that if the particular subquery isn't supported by the physical operators, it will error out at that time?
Yes, exactly.
Benchmark runs are scheduled for baseline = 4dd4d43 and contender = 1d634e5. 1d634e5 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
N/A
Rationale for this change
The rule
scalar_subquery_to_join
converts certain types of qualifying scalar subqueries into joins. When it encounters a subquery that is not possible to convert to a join then it currently fails with an error. It would be better for it to ignore subqueries that are not applicable to this rule.What changes are included in this PR?
Stop failing with an error on scalar subqueries that cannot be converted into joins.
Are there any user-facing changes?