andygrove commented on code in PR #2909:
URL: https://github.com/apache/arrow-datafusion/pull/2909#discussion_r921346443
##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -97,13 +106,85 @@ impl Optimizer {
debug!("Input logical plan:\n{}\n", plan.display_indent());
trace!("Full input logical plan:\n{:?}", plan);
for rule in &self.rules {
- new_plan = rule.optimize(&new_plan, optimizer_config)?;
- observer(&new_plan, rule.as_ref());
- debug!("After apply {} rule:\n", rule.name());
- debug!("Optimized logical plan:\n{}\n", new_plan.display_indent());
+ let result = rule.optimize(&new_plan, optimizer_config);
+ match result {
+ Ok(plan) => {
+ new_plan = plan;
+ observer(&new_plan, rule.as_ref());
+ debug!("After apply {} rule:\n", rule.name());
+ debug!("Optimized logical plan:\n{}\n",
new_plan.display_indent());
+ }
+ Err(ref e) => {
+ if optimizer_config.skip_failing_rules {
Review Comment:
This is the main change here - we now have the option to ignore optimization
rules that fail
--
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]