You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/04/12 19:28:34 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #5963: feat: allow the customization of analyzer rules

alamb commented on code in PR #5963:
URL: https://github.com/apache/arrow-datafusion/pull/5963#discussion_r1164554403


##########
datafusion-examples/examples/rewrite_expr.rs:
##########
@@ -46,10 +47,18 @@ pub fn main() -> Result<()> {
         logical_plan.display_indent()
     );
 
-    // now run the optimizer with our custom rule
-    let optimizer = Optimizer::with_rules(vec![Arc::new(MyRule {})]);
+    // run the analyzer with our custom rule
     let config = OptimizerContext::default().with_skip_failing_rules(false);
-    let optimized_plan = optimizer.optimize(&logical_plan, &config, observe)?;
+    let analyzer = Analyzer::with_rules(vec![Arc::new(MyAnalyzerRule {})]);

Review Comment:
   👍 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org