You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/01 11:04:41 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2666: Remove `ExecutionProps` dependency from `OptimizerRule`

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


##########
datafusion/core/src/execution/context.rs:
##########
@@ -1376,15 +1376,17 @@ impl SessionState {
 
     /// Optimizes the logical plan by applying optimizer rules.
     pub fn optimize(&self, plan: &LogicalPlan) -> Result<LogicalPlan> {
-        let execution_props = &mut self.execution_props.clone();
+        let mut optimizer_config = OptimizerConfig::new();
+        optimizer_config.query_execution_start_time =
+            self.execution_props.query_execution_start_time;
 

Review Comment:
   This might look nicer with a builder style:
   
   ```suggestion
           let optimizer_config = OptimizerConfig::new()
             .with_query_execution_start_time(
               self.execution_props.query_execution_start_time
             );
   
   ```



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