comphead commented on code in PR #16970:
URL: https://github.com/apache/datafusion/pull/16970#discussion_r2245812112


##########
datafusion/optimizer/src/optimizer.rs:
##########
@@ -137,13 +137,15 @@ impl OptimizerContext {
         Self {
             query_execution_start_time: Utc::now(),
             alias_generator: Arc::new(AliasGenerator::new()),
-            options,
+            options: Arc::new(options),
         }
     }
 
     /// Specify whether to enable the filter_null_keys rule
     pub fn filter_null_keys(mut self, filter_null_keys: bool) -> Self {
-        self.options.optimizer.filter_null_join_keys = filter_null_keys;
+        Arc::make_mut(&mut self.options)

Review Comment:
   using `make_mut` can cause extra inner cloning if other Arcs already points 
to the object https://doc.rust-lang.org/std/sync/struct.Arc.html#method.make_mut



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