Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions datafusion/execution/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,30 @@ impl SessionConfig {
self
}

/// Enables or disables the coalescence of small batches into larger batches
pub fn with_coalesce_batches(mut self, enabled: bool) -> Self {
self.options.execution.coalesce_batches = enabled;
self
}

/// Returns true if record batches will be examined between each operator
/// and small batches will be coalesced into larger batches.
pub fn coalesce_batches(&self) -> bool {
self.options.execution.coalesce_batches
}

/// Enables or disables the round robin repartition for increasing parallelism
pub fn with_round_robin_repartition(mut self, enabled: bool) -> Self {
self.options.optimizer.enable_round_robin_repartition = enabled;
self
}

/// Returns true if the physical plan optimizer will try to
/// add round robin repartition to increase parallelism to leverage more CPU cores.
pub fn round_robin_repartition(&self) -> bool {
self.options.optimizer.enable_round_robin_repartition
}

/// Convert configuration options to name-value pairs with values
/// converted to strings.
///
Expand Down
2 changes: 0 additions & 2 deletions docs/source/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,6 @@ Available commands inside DataFusion CLI are:
+-------------------------------------------------+---------+
| datafusion.execution.batch_size | 8192 |
| datafusion.execution.coalesce_batches | true |
| datafusion.execution.coalesce_target_batch_size | 4096 |
| datafusion.execution.time_zone | UTC |
| datafusion.explain.logical_plan_only | false |
| datafusion.explain.physical_plan_only | false |
Expand Down Expand Up @@ -395,7 +394,6 @@ DataFusion CLI v12.0.0
+-------------------------------------------------+---------+
| datafusion.execution.batch_size | 1024 |
| datafusion.execution.coalesce_batches | true |
| datafusion.execution.coalesce_target_batch_size | 4096 |
| datafusion.execution.time_zone | UTC |
| datafusion.explain.logical_plan_only | false |
| datafusion.explain.physical_plan_only | false |
Expand Down
1 change: 0 additions & 1 deletion docs/source/user-guide/sql/information_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ To show the current session configuration options, use the `SHOW ALL` command or
+-------------------------------------------------+---------+
| datafusion.execution.batch_size | 8192 |
| datafusion.execution.coalesce_batches | true |
| datafusion.execution.coalesce_target_batch_size | 4096 |
| datafusion.execution.time_zone | UTC |
| datafusion.explain.logical_plan_only | false |
| datafusion.explain.physical_plan_only | false |
Expand Down