You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by al...@apache.org on 2021/06/18 13:49:41 UTC

[arrow-datafusion] branch master updated: implement default for execution config (#570)

This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/master by this push:
     new e510bd6  implement default for execution config (#570)
e510bd6 is described below

commit e510bd6ac897c3dcfdeae2d6b984ae3e9124fc74
Author: Jiayu Liu <Ji...@users.noreply.github.com>
AuthorDate: Fri Jun 18 21:49:31 2021 +0800

    implement default for execution config (#570)
---
 datafusion/src/execution/context.rs | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/datafusion/src/execution/context.rs b/datafusion/src/execution/context.rs
index 1835244..c1a40ba 100644
--- a/datafusion/src/execution/context.rs
+++ b/datafusion/src/execution/context.rs
@@ -642,9 +642,8 @@ pub struct ExecutionConfig {
     pub repartition_aggregations: bool,
 }
 
-impl ExecutionConfig {
-    /// Create an execution config with default setting
-    pub fn new() -> Self {
+impl Default for ExecutionConfig {
+    fn default() -> Self {
         Self {
             concurrency: num_cpus::get(),
             batch_size: 8192,
@@ -671,6 +670,13 @@ impl ExecutionConfig {
             repartition_aggregations: true,
         }
     }
+}
+
+impl ExecutionConfig {
+    /// Create an execution config with default setting
+    pub fn new() -> Self {
+        Default::default()
+    }
 
     /// Customize max_concurrency
     pub fn with_concurrency(mut self, n: usize) -> Self {