Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`BatchCoalescer::is_empty` rustdoc says the opposite of what it returns

Closed Beginner friendly
#11,606 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Rich-T-kid is already working on this.

Since Oct 22, 2026.

  • #11790 by @Rich-T-kid — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
85/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
rust
Domain
documentation

Research direction

The doc comment is on BatchCoalescer::is_empty in arrow-select/src/coalesce.rs, around lines 616-619. Read the method body, which returns buffered_rows == 0 && completed.is_empty(), and rewrite the first doc line to describe that condition. Done when the rustdoc matches the code and cargo test --doc -p arrow-select passes.

Written by the indexing model from the issue text.

Description

Describe the bug

The rustdoc of BatchCoalescer::is_empty says "Returns true if there is any buffered data". It returns self.buffered_rows == 0 && self.completed.is_empty(), which is true when there is no buffered data and no completed batch.

To Reproduce
use std::sync::Arc;
use arrow_array::{Int32Array, RecordBatch};
use arrow_schema::{DataType, Field, Schema};
use arrow_select::coalesce::BatchCoalescer;

fn main() {
    let schema = Arc::new(Schema::new(vec![Field::new("a", DataType::Int32, false)]));
    let mut co = BatchCoalescer::new(schema.clone(), 10);
    println!("{}", co.is_empty()); // true, with nothing buffered
    let batch = RecordBatch::try_new(schema, vec![Arc::new(Int32Array::from(vec![1, 2]))]).unwrap();
    co.push_batch(batch).unwrap();
    println!("{}", co.is_empty()); // false, with 2 rows buffered
}
Expected behavior

A rustdoc that matches the behavior, such as "Returns true if there are no buffered rows and no completed batches".

Additional context

Found with property-based tests that build arrays in every physical layout the Arrow format allows, on main at 72887ed9. The rustdoc is unchanged on main at dd240116.

Dominant language
Rust
Stars
3.6k
Forks
1.4k
Avg merge
2d 7h
Merged PRs (30d)
311

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/arrow-rs

All issues in apache/arrow-rs

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.