andygrove commented on a change in pull request #7951:
URL: https://github.com/apache/arrow/pull/7951#discussion_r470603772



##########
File path: rust/datafusion/src/execution/context.rs
##########
@@ -62,10 +62,31 @@ use crate::sql::{
 };
 use crate::table::Table;
 
+/// Configuration options for execution context
+#[derive(Copy, Clone)]
+pub struct ExecutionConfig {
+    /// Maximum number of concurrent threads for query execution
+    max_concurrency: usize,

Review comment:
       I was following the builder pattern that @houqp introduced with 
`CsvReadOptions`. Once we have more configs we can chain them together, like 
this:
   
   ```
   ExecutionConfig::new()
     .with_concurrency(48)
     .with_foo(...)
     .with_bar(...)
   ```
   
   We can also add validation logic in these methods. For example, I have now 
added an assertion in `with_concurrency` to assert that the argument is > 0.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to