Skip to content

Commit ea4d85e

Browse files
committed
fix test
1 parent 3e1c603 commit ea4d85e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

datafusion/core/tests/memory_limit/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ async fn test_stringview_external_sort() {
458458
.with_memory_pool(Arc::new(FairSpillPool::new(60 * 1024 * 1024)));
459459
let runtime = builder.build_arc().unwrap();
460460

461-
let config = SessionConfig::new().with_sort_spill_reservation_bytes(40 * 1024 * 1024);
461+
let config = SessionConfig::new()
462+
.with_sort_spill_reservation_bytes(40 * 1024 * 1024)
463+
.with_sort_in_place_threshold_bytes(1024 * 1024);
462464

463465
let ctx = SessionContext::new_with_config_rt(config, runtime);
464466
ctx.register_table("t", Arc::new(table)).unwrap();
@@ -481,6 +483,7 @@ async fn test_stringview_external_sort() {
481483
async fn test_in_mem_buffer_almost_full() {
482484
let config = SessionConfig::new()
483485
.with_sort_spill_reservation_bytes(3000000)
486+
.with_sort_in_place_threshold_bytes(1024 * 1024)
484487
.with_target_partitions(1);
485488
let runtime = RuntimeEnvBuilder::new()
486489
.with_memory_pool(Arc::new(FairSpillPool::new(10 * 1024 * 1024)))

docs/source/user-guide/configs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Environment variables are read during `SessionConfig` initialisation so they mus
8484
| datafusion.execution.planning_concurrency | 0 | Fan-out during initial physical planning. This is mostly use to plan `UNION` children in parallel. Defaults to the number of CPU cores on the system |
8585
| datafusion.execution.skip_physical_aggregate_schema_check | false | When set to true, skips verifying that the schema produced by planning the input of `LogicalPlan::Aggregate` exactly matches the schema of the input plan. When set to false, if the schema does not match exactly (including nullability and metadata), a planning error will be raised. This is used to workaround bugs in the planner that are now caught by the new schema verification step. |
8686
| datafusion.execution.sort_spill_reservation_bytes | 10485760 | Specifies the reserved memory for each spillable sort operation to facilitate an in-memory merge. When a sort operation spills to disk, the in-memory data must be sorted and merged before being written to a file. This setting reserves a specific amount of memory for that in-memory sort/merge process. Note: This setting is irrelevant if the sort operation cannot spill (i.e., if there's no `DiskManager` configured). |
87-
| datafusion.execution.sort_in_place_threshold_bytes | 1048576000 | When sorting, below what size should data be concatenated and sorted in a single RecordBatch rather than sorted in batches and merged. |
87+
| datafusion.execution.sort_in_place_threshold_bytes | 1048576000 | When sorting, below what size should data be concatenated and sorted in a single RecordBatch rather than sorted in batches and merged. Note: In theory we should always be able to sort in place, but some corner cases for merging testing failed, so we set a large threshold to avoid that. Future work: potential remove this option and always sort in place. |
8888
| datafusion.execution.meta_fetch_concurrency | 32 | Number of files to read in parallel when inferring schema and statistics |
8989
| datafusion.execution.minimum_parallel_output_files | 4 | Guarantees a minimum level of output files running in parallel. RecordBatches will be distributed in round robin fashion to each parallel writer. Each writer is closed and a new file opened once soft_max_rows_per_output_file is reached. |
9090
| datafusion.execution.soft_max_rows_per_output_file | 50000000 | Target number of rows in output files when writing multiple. This is a soft max, so it can be exceeded slightly. There also will be one file smaller than the limit if the total number of rows written is not roughly divisible by the soft max |

0 commit comments

Comments
 (0)