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


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -244,12 +256,18 @@ impl Optimizer {
             Arc::new(PushDownLimit::new()),
         ];
 
-        Self::with_rules(rules)
+        Self::with_rules(analyzer_rules, rules)
     }
 
     /// Create a new optimizer with the given rules
-    pub fn with_rules(rules: Vec<Arc<dyn OptimizerRule + Send + Sync>>) -> 
Self {
-        Self { rules }
+    pub fn with_rules(
+        analyzer_rules: Vec<Arc<dyn AnalyzerRule + Send + Sync>>,
+        rules: Vec<Arc<dyn OptimizerRule + Send + Sync>>,
+    ) -> Self {
+        Self {
+            analyzer_rules,
+            rules,
+        }
     }

Review Comment:
   I'm unsure if this is a proper place to customize analyzer rules. But from 
the code structure `Analyzer` is part of `Optimizer`. And only `Optimizer` is 
exposed to the context. Please let me know what you think @alamb @jackwener 



-- 
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]

Reply via email to