Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatchedParquetReader erroneously returns true for is_finished after the first get_batches call #14707

Open
2 tasks done
michaeleisel opened this issue Feb 27, 2024 · 0 comments
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars

Comments

@michaeleisel
Copy link

Checks

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of Polars.

Reproducible example

For the following batched reading of a 10,000,000 row file, p.is_finished() returns true after just the first call to .next_batches. If, however, I just call .next_batches more and ignore p.is_finished() being true, it'll return more batches as I would expect it to.

fn main() {
    let mut p = ParquetReader::new(File::open("/path/to/test_data.parquet").unwrap()).set_low_memory(true).batched(100).unwrap();
    while !p.is_finished() {
        assert!(task::block_on(p.next_batches(1)).is_ok());
    }
}

Cargo.toml:

polars = { version = "0.37.*", features = ["lazy", "parquet", "ndarray", "async", "is_in", "polars-ops", "cloud", "streaming"] }
polars-io = { version = "0.37.*", features = ["lazy", "parquet", "ipc"] }

Log output

No response

Issue description

Expected behavior

It should return false for .is_finished until it's actually finished

Installed versions

@michaeleisel michaeleisel added bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage Awaiting prioritization by a maintainer rust Related to Rust Polars
Projects
None yet
Development

No branches or pull requests

1 participant