alamb commented on code in PR #10849:
URL: https://github.com/apache/datafusion/pull/10849#discussion_r1633299929


##########
datafusion/core/src/execution/session_state.rs:
##########
@@ -387,9 +387,9 @@ impl SessionState {
     /// Add `analyzer_rule` to the end of the list of
     /// [`AnalyzerRule`]s used to rewrite queries.
     pub fn add_analyzer_rule(
-        mut self,
+        &mut self,

Review Comment:
   I think technically this is an API change as now the api takes a `mut ` 
reference rather than `self`
   
   However, I think the change is good as now `add_analyzer_rule` looks more 
like a standard mutation style api (that takes `&mut self`) rather than a 
builder style (`self`)
   
   
   What do you think about adding an api to make things consistent? (we could 
do this as a separate PR)
   
   ```rust
       pub fn with_analyzer_rule(
         mut self, 
           analyzer_rule: Arc<dyn AnalyzerRule + Send + Sync>,
     ) -> Self {
   ..
   }
   ```



-- 
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-unsubscr...@datafusion.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to