ctsk commented on code in PR #15712:
URL: https://github.com/apache/datafusion/pull/15712#discussion_r2045022560
##########
datafusion/execution/src/config.rs:
##########
@@ -193,9 +193,11 @@ impl SessionConfig {
///
/// [`target_partitions`]:
datafusion_common::config::ExecutionOptions::target_partitions
pub fn with_target_partitions(mut self, n: usize) -> Self {
- // partition count must be greater than zero
- assert!(n > 0);
- self.options.execution.target_partitions = n;
+ self.options.execution.target_partitions = if n == 0 {
+
datafusion_common::config::ExecutionOptions::default().target_partitions
+ } else {
+ n
+ };
Review Comment:
seems fine to me
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]