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


##########
datafusion/core/src/execution/context.rs:
##########
@@ -1573,19 +1544,8 @@ impl SessionState {
         physical_optimizers.push(Arc::new(OptimizeSorts::new()));
         // It will not influence the distribution and ordering of the whole 
plan tree.
         // Therefore, to avoid influencing other rules, it should be run at 
last.
-        if config
-            .config_options
-            .get_bool(OPT_COALESCE_BATCHES)
-            .unwrap_or_default()
-        {
-            physical_optimizers.push(Arc::new(CoalesceBatches::new(
-                config
-                    .config_options
-                    .get_u64(OPT_COALESCE_TARGET_BATCH_SIZE)
-                    .unwrap_or_default()
-                    .try_into()
-                    .unwrap(),
-            )));
+        if config.coalesce_batches() {

Review Comment:
   That reads much more nicely 👍 



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