Skip to content

Commit cc77453

Browse files
committed
nit: updated code comments
1 parent 45d869c commit cc77453

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

datafusion/core/tests/fuzz_cases/aggregation_fuzzer/context_generator.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -221,18 +221,16 @@ impl SessionContextGenerator {
221221
// Decide spilling first; it constrains batch_size and partitions below.
222222
let spilling = agg_peak > 0 && rng.random_bool(0.5);
223223

224-
// Cap batch_size when spilling. The spill reserves ~2x the emitted batch
225-
// to sort it, so a large batch needs a pool bigger than the aggregate's
226-
// peak and never spills. Large batches stay covered by the unbounded rounds.
224+
// Cap batch_size when spilling. The spill reserves ~2x the emitted batch to sort it, so a large batch
225+
// needs a pool bigger than the aggregate's peak and never spills. Large batches stay covered by the unbounded rounds.
227226
let batch_size = if spilling {
228227
rng.random_range(1..=cmp::min(self.max_batch_size, SPILL_BATCH_SIZE_CAP))
229228
} else {
230229
rng.random_range(1..=self.max_batch_size)
231230
};
232231

233-
// Single partition when spilling. `FairSpillPool` splits across the
234-
// per-partition aggregate consumers, so with many partitions each share
235-
// is too small and hits `ResourcesExhausted` before it can spill. Multi
232+
// Single partition when spilling. `FairSpillPool` splits across the per-partition aggregate consumers,
233+
// so with many partitions each share is too small and hits `ResourcesExhausted` before it can spill. Multi
236234
// partition stays covered by the unbounded rounds.
237235
let target_partitions = if spilling {
238236
1

datafusion/core/tests/fuzz_cases/aggregation_fuzzer/fuzzer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,8 @@ impl AggregationFuzzTestTask {
275275
async fn run(&self) -> Result<()> {
276276
let task_result = match run_sql(&self.sql, &self.ctx_with_params.ctx).await {
277277
Ok(result) => result,
278-
// A bounded pool too tight to even spill fails with
279-
// `ResourcesExhausted`. Not a correctness bug, so skip and log it
280-
// (no silent drop) instead of failing the run.
278+
// A bounded pool too tight to even spill fails with `ResourcesExhausted`. Not a correctness bug, so skip
279+
// and log it (no silent drop) instead of failing the run.
281280
Err(e)
282281
if self.ctx_with_params.params.memory_limit().is_some()
283282
&& matches!(

0 commit comments

Comments
 (0)